Apparatus, system, and method for allocating storage

ABSTRACT

An apparatus, system, and method are disclosed for allocating non-volatile storage. The storage device may present a logical address, which may exceed a physical storage capacity of the device. The storage device may allocate logical capacity in the logical address space. An allocation request may be allowed when there is sufficient unassigned and/or unallocated logical capacity to satisfy the request. Data may be stored on the non-volatile storage device by requesting physical storage capacity. A physical storage request, such as a storage request or physical storage reservation, when there is sufficient available physical storage capacity to satisfy the request. The device may maintain an index to associate logical identifiers (LIDs) in the logical address space with storage locations on the storage device. This index may be used to make logical capacity allocations and/or to manage physical storage space.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority to U.S. Provisional Application No.61/240,966, entitled, “Apparatus, System, and Method for AllocatingSolid-State Storage,” filed on Sep. 9, 2009, and to U.S. ProvisionalApplication No. 61/373,271, entitled “Apparatus, System, and Method forCaching Data,” filed on Aug. 12, 2010, and U.S. Provisional PatentApplication 61/368,564, entitled “Apparatus, System, and Method forWriting Data to Storage Media in a Single Atomic Operation,” filed onJul. 28, 2010, each of which is incorporated by reference in itsentirety.

FIELD OF THE INVENTION

This invention relates to allocation of data storage and moreparticularly relates to allocation of data storage at a non-volatilestorage device, such as a solid-state storage device.

BACKGROUND Description of the Related Art

Typical data storage devices are block storage devices where there is anear one-to-one mapping between logical block addresses (“LBAs”) andphysical block addresses (“PBAs”). Usually a single exception to theone-to-one mapping between LBAs and PBAs is that the data storage devicemay have a small quantity of extra blocks that can be remapped to blocksthat are determined to be bad. Based on this one-to-one mapping betweenLBAs and PBAs, higher level mapping between LBAs and object names, filenames, and other logical identifiers is done in a file server or filesystem. Typically the data storage device where this one-to-one mappingbetween LBAs and PBAs is used is a random access storage device. Thefile server or file system may use Small Computer System Interface(“SCSI”) commands to send blocks of data assigned to specific LBAs tothe data storage device. For typical storage devices, LBAs are allocatedwhen the data storage device is initialized. In this case, allocation ofLBAs is an assignment of a range or list of LBAs that are available onthe data storage device to a client or computer connected to the fileserver or file system connected to the data storage device.

In a system where a server or other computer has access to more than onedata storage device, if the data storage devices are random accessdevices, the file server or file system typically includes an additionalidentifier with each LBA to identify the particular data storage devicebeing accessed. The identifier may be a drive name, a unique identifierassigned at the manufacturer of the storage device, a logical name, orother identifier that can be used to distinguish between the variousdata storage devices accessible in the system. In this system, clientsmay access the data storage device through one or more servers. Eachclient may be allocated storage space. The allocated storage space maybe an entire storage device, may be a portion of a storage device, ormay be all or part of two or more storage devices. Typically, for asystem where two or more storage devices are accessible to a server orclient in the system, allocation of storage space and correspondingaddresses will be done in a file server or file system connected to thestorage devices. Typically, a file system manages the assigned andunassigned LBAs. Unassigned LBAs are placed in a free LBA pool. When anew file is created, LBAs are removed from the free LBA pool andassociated with the file. When the file is deleted, the LBAs arereturned to the free LBA pool.

In a data storage device where there is not a one-to-one correspondencebetween LBAs and PBAs, such as a sequential storage device or a logstructured storage device, there is typically another level oflogical-to-physical mapping that is similar to the logical-to-logicalmapping that is present in a file system or file server connected to arandom access storage device. These devices manage their own LBA usage,redundantly to any file system accessing the device. This duplicationmakes it advantageous for the file system to implement a “trim command”to provide a hint to the device that the file system is moving an LBAinto the free LBA pool so that the device can do likewise. Additionallogical-to-logical mappings may exist to support other intermediatetransformations such as in support of a thin provisioning layer. In asequential storage device, log structured file system, or other similardevice, the logical-to-logical mapping in the file system/file serverplus the additional logical-to-logical and/or logical-to-physicalmappings are inefficient, add complexity, and in some cases areredundant.

SUMMARY

A non-volatile storage device may present a logical address space toclients. The logical address space may comprise a plurality of logicalidentifiers (LIDs), which may be independent of the physical storagelocations (or “storage locations” generally) of the storage device.Accordingly, there may be no pre-defined and/or pre-set mappings betweenthe logical address space and particular storage locations. The device(or other entity) may maintain an index to associate LIDs in the logicaladdress space with respective storage locations of the storage device.The associations between LIDs and storage locations may be arbitrary.The LID to storage location associations may be used to determineavailable logical capacity and/or available physical storage capacity.

A client request may comprise a request for logical capacity in thelogical address space. The request may be satisfied if there issufficient logical capacity in the logical address space. The logicalcapacity of the logical address space may comprise identifying LIDs thatare allocated, unallocated, assigned, and/or unassigned.

As used herein, an allocated LID may refer to a LID in the logicaladdress space that has been allocated to a particular client. Theallocation may comprise reserving the LID, a range of LIDs, a set ofsequentially ordered LIDS, a set of contiguous LIDS, a set of contiguousand noncontiguous LIDS, and/or logical capacity in the logical addressspace, for use by the client. An allocated LID may or may not correspondto physical storage capacity on the storage device. An unallocated LIDmay refer to a LID in the logical address space that is not allocated toa client and/or associated with data stored on the non-volatile storagedevice.

As used herein, an assigned LID may refer to an allocated LID that isassociated with data stored on the non-volatile storage device.Accordingly, an assigned LID may refer to a LID that is associated withone or more storage locations of the storage device. An unassigned LIDmay refer to a LID that is not associated with data stored on thenon-volatile storage device. As discussed above, an allocated LID may beunassigned. Similarly, an unallocated LID may be unassigned.

An apparatus to allocate data storage space may be configured tofunctionally execute the necessary steps of receiving an allocationrequest, determining if a logical space of a data storage device hassufficient unassigned and/or unallocated logical space, and provide areply.

An allocation request module may receive from a requesting device anallocation request to allocate logical capacity in the logical addressspace. The allocation request is received at a data storage device. Thelogical capacity is for storing data on the data storage device. Thelogical capacity module determines if a logical address space comprisessufficient unassigned and/or unallocated logical space to satisfy theallocation request. The determination may include a search of an indexmaintaining logical capacity allocations, such as a logical-to-physicalmap comprising assigned logical identifiers (“LIDs”) of the logicalspace mapped to one or more physical locations where data correspondingto the assigned LIDs is stored on the data storage device. However,other datastructures, indexes, and/or maps may be used. An allocationreply module may provide a reply to the requesting device in response tothe logical capacity module determining if the logical space hassufficient logical space. The reply may include an indication of whetherthe allocation request can be satisfied.

As used herein a logical identifier (“LID”) may refer to one or more ofa logical block address (“LBA”), a range of LBAs, a set of noncontiguousLBAs, an index, a file name, an inode, or other logical identifier. ALID may refer to logical identifiers other than an object identifier.

In some embodiments, a data storage device comprises a storage deviceand a storage controller and/or a driver where the storage controllerand/or the driver include a logical-to-physical map that includesphysical addresses in the storage device. In another embodiment, astorage capacity corresponding to the logical space (“logical spacecapacity”) is substantially larger than a physical storage capacity ofthe data storage device. The logical space capacity includes theunassigned and/or unallocated logical space combined with allocatedlogical space. The allocated logical space includes the assigned LIDsand unassigned LIDs within the allocated logical space.

In some embodiments, the apparatus includes a physical capacity requestmodule, a physical capacity allocation module, and a physical capacityreply module. The physical capacity request module receives from arequesting device a physical capacity request where the physicalcapacity request is received at the data storage device. The physicalcapacity request includes a request of an amount of available physicalstorage capacity in the data storage device. The physical capacityallocation module determines the amount of available physical storagecapacity on the data storage device. The amount of available physicalstorage capacity includes a physical storage capacity of unassignedstorage locations in the data storage device. In a further embodiment,the physical capacity allocation module tracks assigned physicaladdresses, unassigned physical addresses, allocated physical addresscapacity, and/or unallocated physical address capacity.

In another embodiment, receiving an allocation request includesreceiving a logical allocation request or receiving a request to storedata. In another embodiment, determining if a logical space comprisessufficient unallocated logical space to satisfy the allocation requestincludes receiving a list of requested LIDs to allocate and verifyingthat these LIDs are available for allocation or identifying unallocatedLIDs that meet criteria received in conjunction with the request.

In one embodiment, the apparatus includes an allocation module thatallocates the unallocated logical space sufficient to satisfy theallocation request to the a requesting device in response to the logicalcapacity module determining that the logical space comprises sufficientunallocated logical space to satisfy the allocation request. In afurther embodiment, the allocation module allocates the one or more LIDsin conjunction with a request to store data and allocates the one ormore LIDs in conjunction with storing data associated with the requestto store data.

In one embodiment, communicating a reply to the requesting deviceincludes communicating allocated LIDs to the requesting device where theallocated LIDs satisfies the allocation request. In another embodiment,communicating a reply to the requesting device includes communicating areply to the requesting device that indicates that the data storagedevice comprises sufficient unallocated logical space to satisfy theallocation request. In another embodiment, communicating a reply to therequesting device includes communicating a reply to the requestingdevice that indicates that the data storage device has insufficientunallocated logical space to satisfy the allocation request. In anotherembodiment, communicating a reply to the requesting device includescommunicating an acknowledgement to the requesting device that requestedLIDs were allocated, where the allocation request includes a request toallocate LIDs.

In one embodiment, the apparatus includes an allocation query requestmodule, an allocation query determination module, and an allocationquery reply module. The allocation query request module receives anallocation query at the data storage device. The allocation querydetermination module that identifies one or more LIDs that meet criteriaspecified in the allocation query. The identified LIDs include allocatedLIDs that are assigned, allocated LIDs that are unassigned, and/orunallocated LIDs. The allocation query reply module communicates theresults of the allocation query where the results include a list of theidentified LIDs, an acknowledgement that LIDs meeting the criteria werefound, and/or an acknowledgement that LIDs meeting the criteria in theallocation query were not found.

In another embodiment, the apparatus includes a logical space managementmodule that manages the logical space of the data storage device fromwithin the data storage device. Managing the logical space may includereceiving a deallocation request from a requesting device where thedeallocation request returns one or more allocated LIDs to anunallocated state and communicating to the requesting the successfuldeallocation.

Managing the logical space may include receiving a LID group commandrequest from a requesting device and communicating to the requestingdevice a reply indicating a response to the LID group command request.The LID group command request includes an action to take on two or moreLIDs (“LID group”), metadata associated with the LID group, and/or thedata associated with the LID group. The action includes modifying themetadata, backing up the data, backing up the metadata, changing controlparameters, changing access parameters, deleting data, copying the data,encrypting the data, deduplicating the data, compressing the data,and/or decompressing the data.

In one embodiment, the apparatus includes a physical space reservationrequest module, a physical space reservation module, and a physicalspace reservation return module. The physical space reservation requestmodule receives a request from a requesting device to reserve availablephysical storage capacity on the data storage device (“physical spacereservation request”). The physical space reservation request isreceived at the data storage device and includes an indication of anamount of physical storage capacity requested.

The physical space reservation module determines if the data storagedevice has an amount of available physical storage capacity to satisfythe physical storage space request and reserves an amount of availablephysical storage capacity on the data storage device to satisfy thephysical storage space request (“reserved physical capacity”) inresponse to determining that the amount of available physical storagecapacity is adequate to satisfy the physical space reservation request.The physical space reservation return module transmits to the requestingdevice an indication of availability or unavailability of the requestedamount of physical storage capacity in response to the physical spacereservation module determining if the data storage device has an amountof available physical storage space that satisfies the physical spacereservation request.

The physical space reservation request, in one embodiment, includes anamount of logical space wherein the indication of an amount of physicalstorage capacity requested is derived from the requested logical space.The physical space reservation request, in another embodiment, includesone or more LIDs where the indication of an amount of physical storagecapacity requested is derived from an amount of data associated with theLIDs. The data associated with the LIDs includes data assigned to theLIDs and/or a data capacity allocated to each LID. The physical spacereservation request, in another embodiment, includes a request to storedata where the indication of an amount of physical storage capacityrequested is derived from the data and/or metadata associated with thedata.

The physical space reservation request, in another embodiment, includesa physical space reservation request associated with a request to storedata where the indication of an amount of physical storage capacityrequested is indicated in the physical space reservation request and iscorrelated to the data of the request to store data. The physical spacereservation request, in another embodiment, includes a request toreserve an amount of physical storage capacity. The physical spacereservation request, in another embodiment, includes a request toreserve an amount physical storage capacity and to allocate the reservedphysical storage capacity to a logical entity.

In one embodiment, the apparatus includes a physical space reservationcancellation module that cancels all or a portion of reserved physicalstorage space in response to a cancellation triggering event. Thecancellation triggering event may include determining that data to bewritten to the data storage device and associated with available spacereserved by the physical space reservation module has been previouslystored in the storage system. The cancellation triggering event mayinclude a timeout. The cancellation triggering event may include writingdata associated with the reserved storage space to the data storagedevice where the written data is stored in less than associated reservedphysical capacity.

In another embodiment, the physical space reservation module changes thereserved available physical storage capacity in response to receiving awrite request associated with the physical space reservation request andwriting data to the data storage device in response to the writerequest, receiving a request to cancel reservation of all or a portionof physical storage capacity of the previously received physical spacereservation request, and/or receiving a request to assign additionalphysical storage capacity, where the additional physical storagecapacity is associated with the physical storage capacity of thephysical space reservation request.

In one embodiment, the mapping of one or more LIDs to one or morephysical addresses changes when the data stored at the one or morephysical addresses is moved to one or more different physical addresses,the data stored at the one or more physical addresses is stored at afirst location and is identical to data stored at a second location andthe mapping of the one or more LIDs is changed to correspond to thesecond location, and/or the one or more physical locations mapped to theone or more LIDs (“first LIDs”) are remapped to one or more differentLIDs (“second LIDs”).

Another apparatus for allocating data storage space includes a storagedevice driver. The storage device driver coupled to a file system orfile server via a storage interface wherein the storage interfaceincludes a command interface operational to communicate from the filesystem/file server an allocation request to allocate logical capacity ofa data storage device, where the logical capacity is for storing data onthe data storage device, and to communicate to the file system/fileserver an allocation reply.

The storage device driver and/or the data storage device determine if alogical space includes sufficient unallocated logical space to satisfythe allocation request where the determination includes search of alogical-to-physical map. The logical-to-physical map includes assignedLIDs of the logical space mapped to one or more physical locations wheredata corresponding to the assigned LIDs is stored on the data storagedevice, where an assigned LID differs from the one or more physicaladdresses mapped to the assigned LID. The allocation reply is inresponse to the allocation request and includes an indication of whetherthe logical space comprises sufficient logical space to satisfy theallocation request.

In one embodiment, the apparatus includes a storage device interfaceoperable to couple the storage device driver to the data storage devicesufficient to cause the data storage device to cooperate with thestorage device driver to determine if the logical space comprisessufficient logical capacity to satisfy the allocation request. In afurther embodiment, the storage device interface includes one or more ofperipheral component interconnect express (“PCI Express” or “PCIe”), aserial Advanced Technology Attachment (“ATA”) bus, parallel ATA bus,small computer system interface (“SCSI”), FireWire, Fibre Channel,Universal Serial Bus (“USB”), and PCIe Advanced Switching (“PCIe-AS”).In another embodiment, the command interface is implemented as a newinput-output control (“IO-CTL”) command or an extension of an existingIO-CTL command.

A system of the present invention is also presented to allocate storagespace. The system may be embodied by a storage device with non-volatilestorage, an allocation request module, a logical capacity module, and anallocation reply module. The allocation request module receives from arequesting device an allocation request to allocate logical capacity.The allocation request is received at the data storage device and thelogical capacity is for storing data on the data storage device.

The logical capacity module determines if a logical space has sufficientunallocated logical space to satisfy the allocation request where thedetermination includes search of a logical-to-physical map. Thelogical-to-physical map includes assigned logical identifiers (“LIDs”)of the logical space mapped to one or more physical locations where datacorresponding to the assigned LIDs is stored on the data storage device,where an assigned LID differs from the one or more physical addressesmapped to the assigned LID. The allocation reply module communicates areply to the requesting device in response to the logical capacitymodule determining if the logical space has sufficient logical space,where the reply includes an indication of whether the logical spacecomprises sufficient logical space to satisfy the allocation request.

A method of the present invention is also presented for allocatingstorage space. The method in the disclosed embodiments substantiallyincludes the steps necessary to carry out the functions presented abovewith respect to the operation of the described apparatus and system. Inone embodiment, the method includes receiving from a requesting devicean allocation request to allocate logical capacity where the allocationrequest is received at a data storage device. The logical capacity isfor storing data on the data storage device.

The method also includes determining if a logical space includessufficient unallocated logical space to satisfy the allocation request,where the determination includes search of a logical-to-physical map.The logical-to-physical map includes assigned logical identifiers(“LIDs”) of the logical space mapped to one or more physical locationswhere data corresponding to the assigned LIDs is stored on the datastorage device, where an assigned LID differs from the one or morephysical addresses mapped to the assigned LID. The method includescommunicating a reply to the requesting device in response todetermining if the logical space has sufficient logical space, where thereply includes an indication of whether the logical space comprisessufficient logical space to satisfy the allocation request.

Reference throughout this specification to features, advantages, orsimilar language does not imply that all of the features and advantagesthat may be realized with the present invention should be or are in anysingle embodiment of the invention. Rather, language referring to thefeatures and advantages is understood to mean that a specific feature,advantage, or characteristic described in connection with an embodimentis included in at least one embodiment of the present invention. Thus,discussion of the features and advantages, and similar language,throughout this specification may, but do not necessarily, refer to thesame embodiment.

Furthermore, the described features, advantages, and characteristics ofthe invention may be combined in any suitable manner in one or moreembodiments. One skilled in the relevant art will recognize that theinvention may be practiced without one or more of the specific featuresor advantages of a particular embodiment. In other instances, additionalfeatures and advantages may be recognized in certain embodiments thatmay not be present in all embodiments of the invention.

These features and advantages of the present invention will become morefully apparent from the following description and appended claims, ormay be learned by the practice of the invention as set forthhereinafter.

BRIEF DESCRIPTION OF THE DRAWINGS

In order that the advantages of the invention will be readilyunderstood, a more particular description of the invention brieflydescribed above will be rendered by reference to specific embodimentsthat are illustrated in the appended drawings. Understanding that thesedrawings depict only typical embodiments of the invention and are nottherefore to be considered to be limiting of its scope, the inventionwill be described and explained with additional specificity and detailthrough the use of the accompanying drawings, in which:

FIG. 1A is a schematic block diagram illustrating one embodiment of asystem to allocate data storage space in accordance with the presentinvention;

FIG. 1B is a schematic block diagram illustrating another embodiment ofa system to allocate data storage space in accordance with the presentinvention;

FIG. 1C is a schematic block diagram illustrating yet another embodimentof a system to allocate data storage space in accordance with thepresent invention;

FIG. 2 is a schematic block diagram illustrating a particular embodimentof a solid-state storage device that may include an apparatus toallocate data storage space in accordance with the present invention;

FIG. 3 is a schematic block diagram illustrating a write data pipelineand a read data pipeline in a solid-state storage device that mayinclude an apparatus to allocate data storage space in accordance withthe present invention;

FIG. 4 is a schematic block diagram illustrating one embodiment of anapparatus to allocate data storage space in accordance with the presentinvention;

FIG. 5 is a schematic block diagram illustrating another embodiment ofan apparatus to allocate data storage space in accordance with thepresent invention;

FIG. 6 is a schematic flow chart diagram illustrating one embodiment ofa method for allocating data storage space in accordance with thepresent invention;

FIG. 7 is a schematic flow chart diagram illustrating an embodiment of amethod for servicing a physical capacity request at a storage device inaccordance with the present invention;

FIG. 8 is a schematic flow chart diagram illustrating one embodiment ofa method for reserving physical storage space in accordance with thepresent invention;

FIG. 9 is a schematic flow chart diagram illustrating one embodiment ofa method for assigning allocated logical identifiers in a data storagedevice in accordance with the present invention;

FIG. 10 is a schematic flow chart diagram illustrating anotherembodiment of a method for assigning allocated logical identifiers indata storage device in accordance with the present invention; and

FIG. 11 is a schematic flow chart diagram illustrating an embodiment ofa method for servicing an allocation query at a storage device inaccordance with the present invention.

FIG. 12 is a schematic diagram of exemplary embodiments of indexes toassociate logical identifiers with storage locations of a non-volatilestorage device;

FIG. 13 is a schematic diagram of exemplary embodiments of indexes toassociate logical identifiers with storage locations of a non-volatilestorage device;

FIG. 14 depicts an example of an index for maintaining unallocatedlogical capacity;

FIG. 15 is a flow diagram of one embodiment of a method for allocating anon-volatile storage device; and

FIG. 16 is a flow diagram of one embodiment of a method for allocating anon-volatile storage device.

DETAILED DESCRIPTION

Many of the functional units described in this specification have beenlabeled as modules, in order to more particularly emphasize theirimplementation independence. For example, a module may be implemented asa hardware circuit comprising custom VLSI circuits or gate arrays,off-the-shelf semiconductors such as logic chips, transistors, or otherdiscrete components. A module may also be implemented in programmablehardware devices such as field programmable gate arrays, programmablearray logic, programmable logic devices or the like.

Modules may also be implemented in software for execution by varioustypes of processors. An identified module of executable code may, forinstance, comprise one or more physical or logical blocks of computerinstructions which may, for instance, be organized as an object,procedure, or function. Nevertheless, the executables of an identifiedmodule need not be physically located together, but may comprisedisparate instructions stored in different locations which, when joinedlogically together, comprise the module and achieve the stated purposefor the module.

Indeed, a module of executable code may be a single instruction, or manyinstructions, and may even be distributed over several different codesegments, among different programs, and across several memory devices.Similarly, operational data may be identified and illustrated hereinwithin modules, and may be embodied in any suitable form and organizedwithin any suitable type of data structure. The operational data may becollected as a single data set, or may be distributed over differentlocations including over different storage devices, and may exist, atleast partially, merely as electronic signals on a system or network.Where a module or portions of a module are implemented in software, thesoftware portions are stored on one or more computer readable media.

Reference throughout this specification to “one embodiment,” “anembodiment,” or similar language means that a particular feature,structure, or characteristic described in connection with the embodimentis included in at least one embodiment of the present invention. Thus,appearances of the phrases “in one embodiment,” “in an embodiment,” andsimilar language throughout this specification may, but do notnecessarily, all refer to the same embodiment.

Reference to a computer readable medium may take any form capable ofstoring machine-readable instructions on a digital processing apparatus.A computer readable medium may be embodied by a transmission line, acompact disk, digital-video disk, a magnetic tape, a Bernoulli drive, amagnetic disk, a punch card, flash memory, integrated circuits, or otherdigital processing apparatus memory device.

Furthermore, the described features, structures, or characteristics ofthe invention may be combined in any suitable manner in one or moreembodiments. In the following description, numerous specific details areprovided, such as examples of programming, software modules, userselections, network transactions, database queries, database structures,hardware modules, hardware circuits, hardware chips, etc., to provide athorough understanding of embodiments of the invention. One skilled inthe relevant art will recognize, however, that the invention may bepracticed without one or more of the specific details, or with othermethods, components, materials, and so forth. In other instances,well-known structures, materials, or operations are not shown ordescribed in detail to avoid obscuring aspects of the invention.

The schematic flow chart diagrams included herein are generally setforth as logical flow chart diagrams. As such, the depicted order andlabeled steps are indicative of one embodiment of the presented method.Other steps and methods may be conceived that are equivalent infunction, logic, or effect to one or more steps, or portions thereof, ofthe illustrated method. Additionally, the format and symbols employedare provided to explain the logical steps of the method and areunderstood not to limit the scope of the method. Although various arrowtypes and line types may be employed in the flow chart diagrams, theyare understood not to limit the scope of the corresponding method.Indeed, some arrows or other connectors may be used to indicate only thelogical flow of the method. For instance, an arrow may indicate awaiting or monitoring period of unspecified duration between enumeratedsteps of the depicted method. Additionally, the order in which aparticular method occurs may or may not strictly adhere to the order ofthe corresponding steps shown.

FIG. 1A is a schematic block diagram illustrating one embodiment of asystem 100 to allocate data storage space in accordance with the presentinvention. The system 100 includes a storage system 102 with a storagecontroller 104 and storage devices 106 a-n and a storage device driver118 (hereinafter “storage device driver 118” may be used interchangeablywith “driver 118”). The system 100 includes a server 108 connected toone or more clients 110 over a computer network 112. The server 108 mayalso include one or more clients 110. The server 108 includes a fileserver 114 connected to the driver 118 of the storage system 102 througha storage interface 116. The components of the system 100 are describedbelow in more detail.

The system 100 includes a storage system 102. The storage system 102 maybe a single data storage device, may be a storage area network (“SAN”),just a bunch of disks/drives (“JBOD”), network attached storage (“NAS”)or other storage system known to those of skill in the art. The storagesystem 102, in the embodiment the system 100 depicted in FIG. 1A, isconnected to a file server 114 comprising a file system, and includes adriver 118 located in the server 108. Hereinafter file server and filesystem may be used interchangeably. In one embodiment, the file server114 includes a file system. In other embodiments, one or more clients110, a combination of a file server 114 and one or more clients 110, orother component or system that handles data units, such as objects,files, logical blocks, etc., and stores data units on a storage device106 and interfaces with a data storage device through a storageinterface 116.

In a preferred embodiment, a storage device 106 and a storage controller104 controlling the storage device 106 comprise a data storage device.The data storage device may also include a driver 118 coupled to thestorage controller 104. A driver 118 may be shared between multiplestorage controllers 104 and a storage controller 104 may be shared bymultiple storage devices 106 a-n. A storage system 102 may includemultiple data storage devices, each including a storage device 106.However the multiple data storage devices may have shared storagecontrollers 104 and/or drivers 118. Some of the multiple data storagedevices may have a separate storage controller 104 and/or a separatedriver 118. A data storage device, as it relates to allocation, isdiscussed in more detail below with respect to the apparatus 400 of FIG.4.

In other embodiments, the storage system 102 may not require a specificdriver 118, but may be connected directly to the file server 114 wherethe file server 114 is able to communicate directly to the storagecontroller 104 of the storage system 102. In the depicted embodiment,the driver 118 is located in the server 108, but in other embodiments,the driver 118 may be partially or wholly external to the server 108. Inthe present invention, allocation of logical addresses and logicaladdress management occurs in the storage system 102, as will beexplained further below.

The storage controller 104 is connected to one or more storage devices106 a-n and controls data storage in the storage devices 106. Thestorage controller 104 communicates with one or more file servers114/file systems and typically communicates with the file servers114/file systems through a driver 118. In one embodiment, the driver 118may be an extension of the storage controller 104. In one particularembodiment, the storage controller 104 is a solid-state storage devicecontroller 202 as will be described in more detail in the apparatus 201of FIG. 2. Typically, the storage controller 104 maps logicalidentifiers to physical addresses of the storage devices 106 and canallocate and manage logical identifiers, as will be described in moredetail below. All or part of the allocation and management of logicalidentifiers may be included in the storage controller 104 and driver118. However, global allocation of logical addresses may be external tothe storage system 102, as will be described in more detail in thedescription of the system 103 in FIG. 1C.

In one embodiment, the driver 118, or alternatively the storageinterface 116, is an application program interface (“API”) and acts totranslate commands and other data to a form suitable to be sent to astorage controller 104. In another embodiment, the driver 118 includesone or more functions of the storage controller 104. For example, thedriver 118 may include all or a portion of the modules described belowand may include one or more indexes or maps for the storage devices 106.The driver 118, one or more storage controllers 104, and one or morestorage devices 106 comprising the storage system 102 have a storageinterface 116 connection to a file system/file server and allocationtraditionally done in a file system/file server is advantageously pusheddown (i.e., offloaded) to the storage system 102.

A logical identifier, as used in this application, is an identifier of adata unit that differs from a physical address where data of the dataunit is stored. A data unit, as used in this application, is any set ofdata that is logically grouped together. A data unit may be a file, anobject, a data segment of a redundant array of inexpensive/independentdisks/drives (“RAID”) data stripe, or other data set used in datastorage. The data unit may be executable code, data, metadata,directories, indexes, any other type of data that may be stored in amemory device, or a combination thereof. The data unit may be identifiedby a name, by a logical address, a physical address, an address range,or other convention for identifying data units. A logical identifier(“LID”) includes data unit identifiers, such as a file name, an objectidentifier, an inode, Universally Unique Identifier (“UUID”), GloballyUnique Identifier (“GUID”), or other data unit label, and may alsoinclude a logical block address (“LBA”), cylinder/head/sector (“CHS”),or other lower level logical identifier. A logical identifier generallyincludes any logical label that can be mapped to a physical location.

The storage system 102 depicted includes one storage controller 104, butmay also include other storage controllers 104. In one embodiment, eachstorage controller 104 controls a unique set of storage devices 106. Inanother embodiment, two or more storage controllers 104 may connect to astorage device (e.g. 106 a) and may communicate with each other to storedata on the storage device 106 a. For example, one storage controller104 may be a master and another storage controller 104 may be a slave.One of skill in the art will recognize other ways that two or morestorage controllers 104 may control two or more storage devices 106 in astorage system 102.

The storage system 102 includes one or more storage devices 106 a-n. Astorage device 106 stores data of a data unit as directed by the storagecontroller 104. In one embodiment, the storage device 106 stores atleast some data sequentially or in a log structure or something similar.Typically, in such a storage device 106, data is not stored as in arandom access device. For example, when a data unit is modified, data ofthe data unit is read from one location, modified, and then written to adifferent location. The order and sequence of writing data to the datastorage device 106 becomes a log and by replaying the sequence, an indexcan be constructed or reconstructed.

The modified data may be stored where data is currently beingsequentially stored. The data storage device 106 may include one or moreappend points indicating the next location to store the sequentiallystored data. In such a data storage device 106, logical identifiers aremapped to one or more physical addresses. For example, a logicalidentifier may be mapped to current data as well as to older versions ofthe same data. Sequential storage and logical-to-physical mapping aredescribed in more detail below.

In one embodiment, a storage device 106 may be a solid-state storagedevice or storage class memory, such as flash memory, nano random accessmemory (“nano RAM or NRAM”), magneto-resistive RAM (“MRAM”), dynamic RAM(“DRAM”), phase change RAM (“PRAM”), etc. In other embodiments, astorage device may be a hard disk drive, an optical drive, tape storage,etc. that is organized to store data as a log structured file systemwhere data is stored sequentially.

In another embodiment, a storage device 106 includes a high-performancestorage device, such as flash memory, that operates as cache for a lowerperformance, long-term storage device, such as a hard disk drive. Anexample of solid-state storage operating as cache for a high-capacity,non-volatile storage device is described in U.S. patent application Ser.No. 11/952,123, titled Apparatus, System, and Method for Solid-StateStorage as Cache for High-Capacity, Non-Volatile Storage, to DavidFlynn, et al., and filed Dec. 6, 2007, which is incorporated herein byreference.

In yet another embodiment, the storage device 106, along with a storagecontroller 104, may be part of an in-server storage area network (“SAN”)and may communicate with one or more clients 110, storage controllers104, or servers 108 located external to the server 108 in which thestorage device 106 and storage controller 104 resides. An example ofin-server SAN is described in U.S. patent application Ser. No.11/952,106, titled Apparatus, System, and Method for an In-ServerStorage Area Network, to David Flynn, et al., and filed Dec. 6, 2007,which is incorporated herein by reference. One of skill in the art willrecognize other storage devices 106 where allocating and managinglogical identifiers in the storage system 102 is beneficial.

The system 100 includes a server 108. The server 108 may be embodiedwith in a computer such as a workstation, a mainframe computer, apersonal computer, a laptop computer, or other computing device that hasaccess to a storage device 106. The server 108, in one embodiment, is apartition within a computer. The server 108 may include a physicalenclosure. The storage system 102 may be located in a physical enclosureof a server 108, for example as a peripheral component interconnectexpress (“PCI Express” or “PCI-e”) card plugged into a motherboard ofthe server 108. The storage system 102 may be partially within thephysical enclosure of the server 108. For example, if the storage systemhas a driver 118 running on a processor running the server 108, thestorage controller and/or storage devices 106 may be in an enclosureplugged into the computer or connected through a cable. One of skill inthe art will recognize the many ways that a storage system 102 may beconnected to a server 108 or part of a computer associated with theserver 108.

The server 108, in the depicted embodiment, includes a file server114/file system that is connected to the storage system 102 via astorage interface 116. The file system, in one embodiment, is acomponent of a file server 114 that is accessed by one or more clients110. A client 110 and/or a file system/file server 114 access thestorage system 102 through the storage interface 116.

Typically the file system/file server 114 is connected to a driver 118of the storage system 102 and the driver 118 interfaces with a storagecontroller 104 and one or more storage devices 106 through a storagedevice interface 120. The storage device interface 116 may be a PCI-ebus, a Serial Advanced Technology Attachment (“serial ATA”) bus,parallel ATA, or the like. In another embodiment, the storage deviceinterface 116 is an external bus such as small computer system interface(“SCSI”), FireWire, Fibre Channel, Universal Serial Bus (“USB”), PCIeAdvanced Switching (“PCIe-AS”), or the like. The file server 114/filesystem typically manages files for one or more clients 110 that accessthe storage system 102. In one embodiment, the driver 118 is not presentand the file server 114/file system communicates directly with thestorage controller 104 via the storage device interface 120. Forexample, the storage controller 104 may emulate a device that can beconnected directly to the file server 114/file system, eithertemporarily while a driver 118 is loaded, or for a longer period oftime.

The system 100 includes one or more clients 110. In one embodiment, oneor more clients 110 communicate with the server 108 and file server 114over one or more computer networks 112. In another embodiment, theserver 108 includes one or more clients 110. A client 110 may be anapplication running on the server 108 or other computer. From theperspective of the storage system 102, the file server 114 may be aclient 110 and hereinafter a “client” 110 may include a file server 114.The computer network 112 may include the Internet, a wide area network(“WAN”), a metropolitan area network (“MAN”), a local area network(“LAN”), a token ring, a wireless network, a Fibre Channel network, aSAN, network attached storage (“NAS”), ESCON, or the like, or anycombination of networks. The computer network 112 may also include anetwork from the IEEE 802 family of network technologies, such Ethernet,token ring, WiFi, WiMax, and the like and includes cabling andcomponents to facilitate communication.

A client 110 may be a host, a server, a storage controller of a SAN, aworkstation, a personal computer, a laptop computer, a handheldcomputer, a supercomputer, a computer cluster, a network switch, router,or appliance, a database or storage appliance, a data acquisition ordata capture system, a diagnostic system, a test system, a robot, aportable electronic device, a wireless device, a file server 114, or thelike. A client 110 may run on a computer or server in communication withthe server 108 over a computer network 112. A client 110 may direct afile system to read, write, delete, modify, etc. a file, object, logicalblock, or other data unit stored in the storage system 102. One of skillin the art will recognize that an object may have a very broaddefinition. While the term object may not always include all data units,in this application the “object” is to be interpreted in a broad senseand may include files or other data structures.

The file server 114/file system may then access the data unit using amapping between a logical name for the data unit and a logicalidentifier that the file server 114/file system associated with the dataunit. In a typical embodiment, the file server 114/file system organizesdata of the data unit into logical blocks and associates a logical blockaddress with each logical block. A logical block address may be alocation where the file server 114/file system intends to store thelogical blocks in the storage system 102. The file server 114/filesystem may then direct the storage system 102 through a SCSI commandread request, write request, etc.

In the present invention, management and allocation of logicalidentifiers, such as logical block addresses, occurs in the storagesystem 102, as will be discussed in more detail below. In oneembodiment, the file server 114/file system treats storage in thestorage system 102 as a random access device even when the storagesystem 102 is not random access. In a typical random access device,logical identifiers have almost a one-to-one correspondence to physicaladdresses of the random access device.

This one-to-one mapping in a typical random access device (excluding asmall number of physical addresses on the random access device reservedfor bad block mapping) also correlates to a near one-to-one relationshipbetween storage capacity associated with logical identifiers andphysical capacity associated with physical addresses. For example, if alogical identifier is a logical block address (“LBA”), each logicalblock associated with an LBA has a fixed size. A corresponding physicalblock on the random access device is typically the same size as alogical block. This enables a typical file server 114/file system tomanage physical capacity on the random access device by managing logicalidentifiers, such as LBAs. This continuity of LBA to PBA mapping isgenerally depended upon and utilized by file systems to defragment thedata stored on the data storage device. Similarly, some systems may usethis continuity to locate the data on specific physical tracks toimprove performance as is the case of a technique called “shortstroking” the disk drive. The highly predictable LBA to PBA mapping isessential in certain applications to indirectly manage the storage ofthe data in the physical address space through direct management of thelogical address space.

However, the storage system 102 may be a log structured file system suchthat there is no “fixed” relationship or algorithm to determine themapping of the LBA to the PBA, or in another embodiment, may be randomaccess, but may be accessed by more than one client 110 or file server114/file system such that the logical identifiers allocated to eachclient 110 or file server 114/file system represent a storage capacitymuch larger than the one-to-one relationship of logical to physicalidentifiers of typical systems. The storage system 102 may also bethinly provisioned such that one or more clients 110 each has anallocated logical address range that is much larger than the storagecapacity of the storage devices 106 in the storage system 102. In thesystem 100, the storage system 102 manages and allocates logicalidentifiers such that there is no one-to-one or near one-to-onerelationship between logical identifiers and physical identifiers.

The system 100 is advantageous because it allows more efficientmanagement of storage capacity than typical storage systems. Forexample, for typical random access devices accessible by a number ofclients 110, if each client is allocated a certain amount storage space,the storage space typically will exist and be tied up in the allocationseven if the actual amount of storage space occupied is much less. Thesystem 100 is also advantageous because the system 100 reducescomplexity of standard thin provisioning systems connected to storagedevices 106. A standard thin provisioning system has a thin provisioninglayer that has a logical-to-logical mapping in addition to the storagedevices' 106 logical-to-physical mapping, such as a log structured filesystem or solid-state storage where data is stored sequentially. Thesystem 100 is more efficient because multiple layers of mapping areeliminated and thin provisioning (logical-to-physical mapping) is doneat the lowest level.

FIG. 1B is a schematic block diagram illustrating another embodiment ofa system 101 to allocate data storage space in accordance with thepresent invention. The system 101 depicted in FIG. 1B is a variation ofthe system 100 depicted in FIG. 1A. The system 101 includes a storagesystem 102 connected via a storage interface 116 to a driver 118, thedriver 118 connected to each storage controller 104 via a storage deviceinterface 120, and storage devices 106 a-n which are substantiallysimilar to those described above in relation to the system 100 of FIG.1A. The system 101 also includes one or more clients 110 connected to acomputer network 112, which are again substantially similar to thosedescribed above with respect to the system 100 of FIG. 1A.

In the system 101 of FIG. 1B, the clients 110 each have a file server114/file system and access the storage system 102 through a storageappliance 122. The file server 114/file system may be a distributed fileserver/file system such as IBM's GPFS or the Lustre Clustering FileSystem The storage appliance 122 may be a SAN controller, a RAIDcontroller, or the like and each file server 114/file system may connectindependently to the storage devices 106 of the storage system 102. Thestorage appliance 122 may be a client 110 to the storage system 102. Inthis case, the system 101 is advantageous because, in one embodiment,each file server 114/file system may treat the attached storage of thestorage system 102 as a SCSI device using standard SCSI protocol, or anextension to standard SCSI protocols. Each client 110 and its fileserver 114/file system may operate as if it has full access to storagespace allocated to the client 110 by the storage system 102 even if theactual storage space of the storage system 102 is much less than thestorage space allocated to the various clients 110.

The storage system 102 can efficiently manage and allocate logicalidentifiers for the clients 110 while allowing the file servers 114/filesystem to use standard protocol to connect to the storage system 102. Inanother embodiment, the storage system 102 manages and allocates logicalidentifiers for the clients 110 within a virtual server or guest on avirtualization operating system such as VMware. In another embodiment,the file servers 114/file system are configured to offload allocationmanagement to the storage system 102 and communicate with the storagedevice driver 118 with allocation requests, allocation queries, etc.,and receive replies to the requests, as will be explained below ingreater detail.

The storage devices 106 may be in the storage appliance 122 or externalto the storage appliance 122. In one embodiment, one or more storagedevices 106 are located in the storage appliance 122 and one or morestorage devices 106 are located external to the storage appliance 122.The storage devices 106 may be collocated with the storage appliance 122or may be remote from the storage appliance 122. One of skill in the artwill recognize other storage appliances 122 and other configurations ofthe storage appliance 122 and storage devices 106.

In one embodiment, one or more of the clients 110 include a driver 118(not shown) in addition to the driver 118 shown in the storage system102. In another embodiment, the storage system 102 does not include adriver 118, but each client 110 includes a driver 118. A driver 118typically acts as to interpret commands and other communication betweenthe storage system 102 and the file server 114/file system or thestorage appliance 122. In one embodiment, the storage system 102emulates a standard storage device until a driver 118 is loaded. Thedriver 118 may then allow additional features and commands not availablewithout the driver 118.

FIG. 1C is a schematic block diagram illustrating yet another embodimentof a system 103 to allocate data storage space in accordance with thepresent invention. The system 103 includes two or more storage systems102 a-n with storage devices 106 a-n, each in a server 108 a-n connectedto clients 110 through one or more computer networks 112. The system 103also includes a master allocation manager 124 that communicates to eachserver 108 and can communicate with the clients 110. The storage devices106, storage systems 102, servers 108, clients 110, and computer network112 are substantially similar to those described above in relation tothe systems 100, 101 of FIGS. 1A and 1B. In addition, the system 103includes storage controllers 104, storage interfaces 116, file servers114/file system, and may include drivers 118, and other components andfeatures described above. The embodiment depicted in the system 103 ofFIG. 1C is intended to show that the number of servers 108 with storagesystems 102 is not limited and may include more than one storage system103.

The system 103, in one embodiment, includes a master allocation manager124. In one embodiment, the master allocation manager 124 managesstorage space allocation at a high level. For example, the masterallocation manager 124 may allocate a storage capacity to each client110. The master allocation manager 124 may then coordinate with eachstorage system 102 a-n to allocate and manage logical identifiers foreach of the clients 110. In one embodiment, the master allocationmanager 124 manages storage space at a high level, allocating storagecapacities, placing limits on storage capacity, assigning storagesystems 102 or storage devices 106 to clients 110, etc. while thestorage systems 102 manage and allocate at a lower level by tracking andallocating logical identifiers and mapping logical identifiers tophysical locations. The master allocation manager 124 sends allocationrequests, physical capacity requests, allocation queries, etc. to thestorage systems 102 a-n and receives replies that enable the masterallocation manager 124 to manage logical space. One of skill in the artwill recognize other ways for a master allocation manager 124 tointegrate with storage systems 102 that allocate and manage logicalidentifiers.

In one embodiment, the master allocation manager 124, unlike a thinprovisioning layer, which also manages the logical and or physicalallocation, does not need to do a logical to logical remapping. Themaster allocation manager 124 may do other allocation functions commonto a thin provisioning system, but off-load the primary allocation(logical and physical) to the storage system 102.

Solid-State Storage Device

FIG. 2 is a schematic block diagram illustrating a particular embodiment200 of a solid-state storage device controller 202 that may include anapparatus to allocate data storage space in accordance with the presentinvention. The solid-state storage device 206 includes a write datapipeline 301 and a read data pipeline 303, which are described below inmore detail in the discussion related to FIG. 3. The solid-state storagedevice controller 202 may include a number of solid-state storagecontrollers 0-N 204 a-n, each controlling solid-state storage 207. Inthe depicted embodiment, two solid-state controllers are shown:solid-state controller 0 204 a and solid-state storage controller N 204n, and each controls solid-state storage 207 a-n.

In the depicted embodiment, solid-state storage controller 0 204 acontrols a data channel so that the attached solid-state storage 207 astores data. Solid-state storage controller N 204 n controls an indexmetadata channel associated with the stored data and the associatedsolid-state storage 207 n stores index metadata. In an alternateembodiment, the solid-state storage device controller 202 includes asingle solid-state controller 204 a with a single solid-state storage207 a. In another embodiment, there are a plurality of solid-statestorage controllers 204 a-n and associated solid-state storage 207 a-n.In one embodiment, one or more solid state controllers 204 a-204 n-1,coupled to their associated solid-state storage 207 a-207 n-1, controldata while at least one solid-state storage controller 204 n, coupled toits associated solid-state storage 207 n, controls index metadata.

In one embodiment, at least one solid-state controller 204 isfield-programmable gate array (“FPGA”) and controller functions areprogrammed into the FPGA. In a particular embodiment, the FPGA is aXilinx® FPGA. In another embodiment, the solid-state storage controller204 comprises components specifically designed as a solid-state storagecontroller 204, such as an application-specific integrated circuit(“ASIC”) or custom logic solution. In another embodiment, at least onesolid-state storage controller 204 is made up of a combination FPGA,ASIC, and custom logic components.

Solid-State Storage

The solid state storage 206 is an array of non-volatile solid-statestorage elements 216, 218, 220, arranged in banks 214, and accessed inparallel through a bi-directional storage input/output (“I/O”) bus 210.The storage I/O bus 210, in one embodiment, is capable of unidirectionalcommunication at any one time. For example, when data is being writtento the solid-state storage 207, data cannot be read from the solid-statestorage 207. In another embodiment, data can flow both directionssimultaneously. However bi-directional, as used herein with respect to adata bus, refers to a data pathway that can have data flowing in onlyone direction at a time, but when data flowing one direction on thebi-directional data bus is stopped, data can flow in the oppositedirection on the bi-directional data bus. Data is written and read on abit-level over the storage I/O bus 210 as control lines and addresslines within the control bus 212 are asserted.

A solid-state storage element (e.g. SSS 0.0 216 a) is typicallyconfigured as a chip (a package of one or more dies) or a die on acircuit board. As depicted, a solid-state storage element (e.g. 216 a)operates independently or semi-independently of other solid-statestorage elements (e.g. 218 a) even if these several elements arepackaged together in a chip package, a stack of chip packages, or someother package element. As depicted, a column of solid-state storageelements 216, 218, 220 is designated as a bank 214. As depicted, theremay be “n” banks 214 a-n and “m” solid-state storage elements 216 a-m,218 a-m, 220 a-m per bank in an array of n×m solid-state storageelements 216, 218, 220 in a solid-state storage 207. In one embodiment,a solid-state storage 207 a includes twenty solid-state storage elements216, 218, 220 per bank 214 with eight banks 214 and a solid-statestorage 207 n includes 2 solid-state storage elements 216, 218 per bank214 with one bank 214. In one embodiment, each solid-state storageelement 216, 218, 220 is comprised of a single-level cell (“SLC”)devices. In another embodiment, each solid-state storage element 216,218, 220 is comprised of multi-level cell (“MLC”) devices.

In one embodiment, solid-state storage elements for multiple banks thatshare a common storage I/O bus 210 a row (e.g. 216 b, 218 b, 220 b) arepackaged together. In another embodiment, a solid-state storage element216, 218, 220 may have one or more dies per chip with one or more chipsstacked vertically and each die may be accessed independently. Inanother embodiment, a solid-state storage element (e.g. SSS 0.0 216 a)may have one or more virtual dies per die and one or more dies per chipand one or more chips stacked vertically and each virtual die may beaccessed independently. In another embodiment, a solid-state storageelement SSS 0.0 216 a may have one or more virtual dies per die and oneor more dies per chip with some or all of the one or more dies stackedvertically and each virtual die may be accessed independently.

In one embodiment, two dies are stacked vertically with four stacks pergroup to form eight storage elements (e.g. SSS 0.0-SSS 0.8) 216 a-220 a,each in a separate bank 214 a-n. In another embodiment, 20 storageelements (e.g. SSS 0.0-SSS 20.0) 216 form a virtual bank 214 a (orlogical bank) so that each of the eight virtual banks has 20 storageelements (e.g. SSS0.0-SSS 20.8) 216, 218, 220. Data is sent to thesolid-state storage 207 over the storage I/O bus 210 to all storageelements of a particular group of storage elements (SSS 0.0-SSS 0.8) 216a, 218 a, 220 a. The storage control bus 212 a is used to select aparticular bank (e.g. Bank-0 214 a) so that the data received over thestorage I/O bus 210 connected to all banks 214 is written just to theselected bank 214 a.

In a preferred embodiment, the storage I/O bus 210 is comprised of oneor more independent I/O buses (“IIOBa-m” comprising 210 a.a-m, 210n.a-m) wherein the solid-state storage elements within each row shareone of the independent I/O buses accesses each solid-state storageelement 216, 218, 220 in parallel so that all banks 214 are accessedsimultaneously. For example, one channel of the storage I/O bus 210 mayaccess a first solid-state storage element 216 a, 218 a, 220 a of eachbank 214 a-n simultaneously. A second channel of the storage I/O bus 210may access a second solid-state storage element 216 b, 218 b, 220 b ofeach bank 214 a-n simultaneously. Each row of solid-state storageelement 216, 218, 220 is accessed simultaneously.

In one embodiment, where solid-state storage elements 216, 218, 220 aremulti-level (physically stacked), all physical levels of the solid-statestorage elements 216, 218, 220 are accessed simultaneously. As usedherein, “simultaneously” also includes near simultaneous access wheredevices are accessed at slightly different intervals to avoid switchingnoise. Simultaneously is used in this context to be distinguished from asequential or serial access wherein commands and/or data are sentindividually one after the other.

Typically, banks 214 a-n are independently selected using the storagecontrol bus 212. In one embodiment, a bank 214 is selected using a chipenable or chip select. Where both chip select and chip enable areavailable, the storage control bus 212 may select one level of amulti-level solid-state storage element 216, 218, 220. In otherembodiments, other commands are used by the storage control bus 212 toindividually select one level of a multi-level solid-state storageelement 216, 218, 220. Solid-state storage elements 216, 218, 220 mayalso be selected through a combination of control and of addressinformation transmitted on storage I/O bus 210 and the storage controlbus 212.

In one embodiment, each solid-state storage element 216, 218, 220 ispartitioned into erase blocks and each erase block is partitioned intopages. A typical page is 2000 bytes (“2 kB”). In one example, asolid-state storage element (e.g. SSS0.0) includes two registers and canprogram two pages so that a two-register solid-state storage element216, 218, 220 has a capacity of 4 kB. A bank 214 of 20 solid-statestorage elements 216, 218, 220 would then have an 80 kB capacity ofpages accessed with the same address going out the channels of thestorage I/O bus 210.

This group of pages in a bank 214 of solid-state storage elements 216,218, 220 of 80 kB may be called a virtual or logical page. Similarly, anerase block of each storage element 216 a-m of a bank 214 a may begrouped to form a virtual or logical erase block. In a preferredembodiment, an erase block of pages within a solid-state storage element216, 218, 220 is erased when an erase command is received within asolid-state storage element 216, 218, 220. Whereas the size and numberof erase blocks, pages, planes, or other logical and physical divisionswithin a solid-state storage element 216, 218, 220 are expected tochange over time with advancements in technology, it is to be expectedthat many embodiments consistent with new configurations are possibleand are consistent with the general description herein.

Typically, when a packet is written to a particular location within asolid-state storage element 216, 218, 220, where the packet is intendedto be written to a location within a particular page which is specificto a of a particular erase block of a particular element of a particularbank, a physical address is sent on the storage I/O bus 210 and followedby the packet. The physical address contains enough information for thesolid-state storage element 216, 218, 220 to direct the packet to thedesignated location within the page. Since all storage elements in a rowof storage elements (e.g. SSS 0.0-SSS 0.N 216 a, 218 a, 220 a) areaccessed simultaneously by the appropriate bus within the storage I/Obus 210 a.a, to reach the proper page and to avoid writing the datapacket to similarly addressed pages in the row of storage elements (SSS0.0-SSS 0.N 216 a, 218 a, 220 a), the bank 214 a that includes thesolid-state storage element SSS 0.0 216 a with the correct page wherethe data packet is to be written is simultaneously selected by thestorage control bus 212.

Similarly, a read command traveling on the storage I/O bus 212 requiresa simultaneous command on the storage control bus 212 to select a singlebank 214 a and the appropriate page within that bank 214 a. In apreferred embodiment, a read command reads an entire page, and becausethere are multiple solid-state storage elements 216, 218, 220 inparallel in a bank 214, an entire logical page is read with a readcommand. However, the read command may be broken into subcommands, aswill be explained below with respect to bank interleave. A logical pagemay also be accessed in a write operation.

An erase block erase command may be sent out to erase an erase blockover the storage I/O bus 210 with a particular erase block address toerase a particular erase block. Typically, an erase block erase commandmay be sent over the parallel paths of the storage I/O bus 210 to erasea logical erase block, each with a particular erase block address toerase a particular erase block. Simultaneously a particular bank (e.g.bank-0 214 a) is selected over the storage control bus 212 to preventerasure of similarly addressed erase blocks in all of the banks (banks1-N 214 b-n). Other commands may also be sent to a particular locationusing a combination of the storage I/O bus 210 and the storage controlbus 212. One of skill in the art will recognize other ways to select aparticular storage location using the bi-directional storage I/O bus 210and the storage control bus 212.

In one embodiment, data packets are written sequentially to thesolid-state storage 207. For example, data packets are streamed to thestorage write buffers of a bank 214 a of storage elements 216 and whenthe buffers are full, the data packets are programmed to a designatedlogical page. Data packets then refill the storage write buffers and,when full, the packets are written to the same logical page if spaceexists or to the next logical page. The next logical page may be in thesame bank 214 a or another bank (e.g. 214 b). This process continues,logical page after logical page, typically until a logical erase blockis filled. In another embodiment, the streaming may continue acrosslogical erase block boundaries with the process continuing, logicalerase block after logical erase block.

In one embodiment, each solid-state storage element in a logical page(e.g. 216 a-n) includes one or more append points. An append point maybe located where data from the write buffers will next be written. Oncedata is written at an append point, the append point moves to the end ofthe data. This process typically continues until a logical erase blockis full. The append point is then moved to a different logical eraseblock. The sequence of writing to logical erase blocks is maintained sothat if an index comprising a mapping between logical and physicaladdresses is corrupted or lost, the sequence of storing data can bereplayed to rebuild the index.

This type of sequential storage may be called log structured array andthe storage system 102 with this type of sequential storage may be atype of log structured system. In this sequential storage system or logstructured file system, when data is modified in a read-modify-writeoperation, data is read from one location, modified, and then written toan append point rather than over top of the location where the data isread. The index maps a logical identifier associated with the data toeach location where data corresponding to the logical identifier isstored. If invalid data is not needed, the data may be erased in agarbage collection operation and the index will be updated to reflectthat the invalid data is gone. Older versions of the data may also betracked in the index to keep track of each version. If the index iscorrupted, the sequence is replayed to rebuild the index and each timedata for a particular logical identifier is encountered, the index isupdated. Once the entire sequence has been replayed, the most recentversion of data of a particular logical identifier is typically mappedto the logical identifier.

In one embodiment, each solid-state storage element 216, 218, 220includes more than one append point. For example, hot data, e.g. newdata or data used frequently, can be sequentially stored at an appendpoint at one logical erase block while cold data e.g. data usedinfrequently, can be stored at a different append point in anotherlogical erase block. In various embodiments, the solid-state storageelements 216, 218, 220 can have more than two append points.

In a read, modify, write operation, data packets associated with a dataunit are located and read in a read operation. Data segments of themodified data unit that have been modified are not written to thelocation from which they are read. Instead, the modified data segmentsare again converted to data packets and then written to the nextavailable location in the logical page currently being written. Theindex entries for the respective data packets are modified to point tothe packets that contain the modified data segments. The entry orentries in the index for data packets associated with the same data unitthat have not been modified will include pointers to the originallocation of the unmodified data packets. Thus, if the original data unitis maintained, for example to maintain a previous version of the dataunit, the original data unit will have pointers in the index to all datapackets as originally written. The new data unit will have pointers inthe index to some of the original data packets and pointers to themodified data packets in the logical page that is currently beingwritten.

In a copy operation, the index includes an entry for the original dataunit mapped to a number of packets stored in the solid-state storage207. When a copy is made, in one embodiment a new data unit is createdand a new entry is created in the index mapping the new data unit to theoriginal packets. The new data unit is also written to the solid-statestorage 207 with its location mapped to the new entry in the index. Thenew data unit packets may be used to identify the packets within theoriginal data unit that are referenced in case changes have been made inthe original data unit that have not been propagated to the copy and theindex is lost or corrupted.

Typically for sequential storage, a physical address of where data iswritten is not known before the data is stored on the storage device 106but is determined at the time of storing the data. Typically availablephysical storage capacity in the data storage device is not mapped to anLID until data corresponding to the LID is stored on the data storagedevice or at least until a location of an append point where the data isstored is determined.

Beneficially, sequentially writing packets facilitates a more even useof the solid-state storage 207 and allows the solid-storage devicecontroller 202 to monitor storage hot spots and level usage of thevarious logical pages in the solid-state storage 207. Sequentiallywriting packets also facilitates a powerful, efficient garbagecollection system, which is described in detail below. One of skill inthe art will recognize other benefits of sequential storage of datapackets.

Solid-State Storage Device Controller

In various embodiments, the solid-state storage device controller 202also includes a data bus 205, a local bus 209, a buffer controller 208,buffers 0-N 222 a-n, a master controller 224, a direct memory access(“DMA”) controller 226, a memory controller 228, a dynamic memory array230, a static random memory array 232, a management controller 234, amanagement bus 236, a bridge 238 to a system bus 240, and miscellaneouslogic 242, which are described below. In other embodiments, the systembus 240 is coupled to one or more network interface cards (“NICs”) 244,some of which may include remote DMA (“RDMA”) controllers 246, one ormore central processing unit (“CPU”) 248, one or more external memorycontrollers 250 and associated external memory arrays 252, one or morestorage controllers 254, peer controllers 256, and application specificprocessors 258, which are described below. The components 244-258connected to the system bus 240 may be located in the server 108 or maybe other devices.

Typically the solid-state storage controller(s) 204 communicate data tothe solid-state storage 207 over a storage I/O bus 210. In a typicalembodiment where the solid-state storage is arranged in banks 214 andeach bank 214 includes multiple storage elements 216, 218, 220 accessedin parallel, the storage I/O bus 210 is an array of busses, one for eachrow of storage elements 216, 218, 220 spanning the banks 214. As usedherein, the term “storage I/O bus” may refer to one storage I/O bus 210or an array of data independent busses (not shown). In a preferredembodiment, each storage I/O bus 210 accessing a row of storage elements(e.g. 216 a, 218 a, 220 a) may include a logical-to-physical mapping forstorage divisions (e.g. erase blocks) accessed in a row of storageelements 216 a, 218 a, 220 a. This mapping may also allow a logicaladdress mapped to a physical address of a storage division to beremapped to a different storage division if the first storage divisionfails, partially fails, is inaccessible, or has some other problem.

Data may also be communicated to the solid-state storage controller(s)204 from a requesting device, such as a client 110 or file server114/file system, through the system bus 240, bridge 238, local bus 209,buffer(s) 222, and finally over a data bus 205. The data bus 205typically is connected to one or more buffers 222 a-n controlled with abuffer controller 208. The buffer controller 208 typically controlstransfer of data from the local bus 209 to the buffers 222 and throughthe data bus 205 to the pipeline input buffer 306 and output buffer 330(see FIG. 3). The buffer controller 208 typically controls how dataarriving from a requesting device can be temporarily stored in a buffer222 and then transferred onto a data bus 205, or vice versa, to accountfor different clock domains, to prevent data collisions, etc. The buffercontroller 208 typically works in conjunction with the master controller224 to coordinate data flow. As data arrives, the data will arrive onthe system bus 240, be transferred to the local bus 209 through a bridge238.

Typically the data is transferred from the local bus 209 to one or moredata buffers 222 as directed by the master controller 224 and the buffercontroller 208. The data then flows out of the buffer(s) 222 to the databus 205, through a solid-state controller 204, and on to the solid-statestorage 207 such as NAND flash or other storage media. In a preferredembodiment, data and associated out-of-band metadata (“data unitmetadata”) arriving with the data is communicated using one or more datachannels comprising one or more solid-state storage controllers 204a-204 n-1 and associated solid-state storage 207 a-207 n-1 while atleast one channel (solid-state storage controller 204 n, solid-statestorage 207 n) is dedicated to in-band metadata, such as indexinformation and other metadata generated internally to the solid-statestorage device 206.

The local bus 209 is typically a bidirectional bus or set of busses thatallows for communication of data and commands between devices internalto the solid-state storage device controller 202 and between devicesinternal to the solid-state storage device 206 and devices 244-258connected to the system bus 240. The bridge 238 facilitatescommunication between the local bus 209 and system bus 240. One of skillin the art will recognize other embodiments such as ring structures orswitched star configurations and functions of buses 240, 209, 205, 210and bridges 238.

The system bus 240 is typically a bus of a computer, server 108, orother device in which the solid-state storage device 206 is installed orconnected. In one embodiment, the system bus 240 may be a PCI-e bus, aSerial Advanced Technology Attachment (“serial ATA”) bus, parallel ATA,or the like. In another embodiment, the system bus 240 is an externalbus such as small computer system interface (“SCSI”), FireWire, FibreChannel, USB, PCIe-AS, or the like. The solid-state storage device 206may be packaged to fit internally to a device or as an externallyconnected device.

The solid-state storage device controller 202 includes a mastercontroller 224 that controls higher-level functions within thesolid-state storage device 206. The master controller 224, in variousembodiments, controls data flow by interpreting storage requests andother requests, directs creation of indexes to map identifiersassociated with data to physical locations of associated data,coordinating DMA requests, etc. Many of the functions described hereinare controlled wholly or in part by the master controller 224.

In one embodiment, the master controller 224 uses embeddedcontroller(s). In another embodiment, the master controller 224 useslocal memory such as a dynamic memory array 230 (dynamic random accessmemory “DRAM”), a static memory array 323 (static random access memory“SRAM”), etc. In one embodiment, the local memory is controlled usingthe master controller 224. In another embodiment, the master controlleraccesses the local memory via a memory controller 228. In anotherembodiment, the master controller runs a Linux server and may supportvarious common server interfaces, such as the World Wide Web, hyper-textmarkup language (“HTML”), etc. In another embodiment, the mastercontroller 224 uses a nano-processor. The master controller 224 may beconstructed using programmable or standard logic, or any combination ofcontroller types listed above. One skilled in the art will recognizemany embodiments for the master controller 224.

In one embodiment, where the storage controller 104/solid-state storagedevice controller 202 manages multiple data storage devices106/solid-state storage 207 a-n, the master controller 224 divides thework load among internal controllers, such as the solid-state storagecontrollers 204 a-n. For example, the master controller 224 may dividean data to be written to the data storage devices (e.g. solid-statestorage 207 a-n) so that a portion of the data is stored on each of theattached data storage devices 106/solid-state storage 207. This featureis a performance enhancement allowing quicker storage and access to andata. In one embodiment, the master controller 224 is implemented usingan FPGA. The solid-state storage device controller 202 may also beimplemented using an FPGA. In another embodiment, the firmware withinthe master controller 224 may be updated through the management bus 236,the system bus 240 over a network connected to a network interface card(“NIC”) 244 or other device connected to the system bus 240.

In one embodiment, the master controller 224, which manages objects,files, another data units, emulates block storage such that a computeror server 108 or other device connected to the storage device106/solid-state storage device 206 views the storage device106/solid-state storage device 206 as a block storage device and sendsdata divided into logical blocks to specific logical block addresses inthe storage device 106/solid-state storage device 206. The mastercontroller 224 then divides up the logical blocks and stores data fromthe logical blocks as it would any other data unit, such as an object.The master controller 224 then maps the logical blocks and logical blockaddresses sent with the logical blocks to the actual physical locationswhere the data is stored. The mapping is stored in the index. Typically,for logical block emulation, a block device application programinterface (“API”) is provided in a driver 118 in the server 108, client110, or other device wishing to use the storage device 106/solid-statestorage device 206 as a block storage device.

In another embodiment, the master controller 224 coordinates with NICcontrollers 244 and embedded RDMA controllers 246 to deliverjust-in-time RDMA transfers of data and command sets. NIC controller 244may be hidden behind a non-transparent port to enable the use of customdrivers. Also, a driver on a client 110 may have access to the computernetwork 118 through an I/O memory driver using a standard stack API andoperating in conjunction with NICs 244.

In one embodiment, the master controller 224 is also a RAID controller.Where the data storage device/solid-state storage device 206 isnetworked with one or more other data storage devices 106/solid-statestorage devices 206, the master controller 224 may be a RAID controllerfor single tier RAID, multi-tier RAID, progressive RAID, etc. The mastercontroller 224 also allows some objects to be stored in a RAID array andother objects to be stored without RAID. In another embodiment, themaster controller 224 may be a distributed RAID controller element. Inanother embodiment, the master controller 224 may comprise many RAID,distributed RAID, and other functions as described elsewhere.

In one embodiment, the master controller 224 coordinates with single orredundant network managers (e.g. switches) to establish routing, tobalance bandwidth utilization, failover, etc. In another embodiment, themaster controller 224 coordinates with integrated application specificlogic (via local bus 209) and associated driver software. In anotherembodiment, the master controller 224 coordinates with attachedapplication specific processors 258 or logic (via the external systembus 240) and associated driver software. In another embodiment, themaster controller 224 coordinates with remote application specific logic(via the computer network 118) and associated driver software. Inanother embodiment, the master controller 224 coordinates with the localbus 209 or external bus attached hard disk drive (“HDD”) storagecontroller. The controller 202 may make the storage controllers 254invisible to the client.

In one embodiment, the master controller 224 communicates with one ormore storage controllers 254 where the storage device 106/solid-statestorage device 206 may appear as a storage device connected through aSCSI bus, Internet SCSI (“iSCSI”), Fibre Channel, etc. Meanwhile thestorage device 106/solid-state storage device 206 may autonomouslymanage objects, files, and other data units and may appear as an objectfile system, distributed object file system, file system, etc. Themaster controller 224 may also be accessed by peer controllers 256and/or application specific processors 258.

In another embodiment, the master controller 224 coordinates with anautonomous integrated management controller to periodically validateFPGA code and/or controller software, validate FPGA code while running(reset) and/or validate controller software during power on (reset),support external reset requests, support reset requests due to watchdogtimeouts, and support voltage, current, power, temperature, and otherenvironmental measurements and setting of threshold interrupts. Inanother embodiment, the master controller 224 manages garbage collectionto free erase blocks for reuse. In another embodiment, the mastercontroller 224 manages wear leveling, refreshing of storage cells, andthe like.

In another embodiment, the master controller 224 allows the data storagedevice/solid-state storage device 206 to be partitioned into multiplevirtual devices and allows partition-based media encryption. In yetanother embodiment, the master controller 224 supports a solid-statestorage controller 204 with advanced, multi-bit ECC correction. One ofskill in the art will recognize other features and functions of a mastercontroller 224 in a storage controller 104, or more specifically in asolid-state storage device 206.

In one embodiment, the solid-state storage device controller 202includes a memory controller 228 which controls a dynamic random memoryarray 230 and/or a static random memory array 232. As stated above, thememory controller 228 may be independent or integrated with the mastercontroller 224. The memory controller 228 typically controls volatilememory of some type, such as DRAM (dynamic random memory array 230) andSRAM (static random memory array 232). In other examples, the memorycontroller 228 also controls other memory types such as electricallyerasable programmable read only memory (“EEPROM”), etc. In otherembodiments, the memory controller 228 controls two or more memory typesand the memory controller 228 may include more than one controller.Typically, the memory controller 228 controls as much SRAM 232 as isfeasible and by DRAM 230 to supplement the SRAM 232.

In one embodiment, the index is stored in memory 230, 232 and thenperiodically off-loaded to a channel of the solid-state storage 207 n orother non-volatile memory. One of skill in the art will recognize otheruses and configurations of the memory controller 228, dynamic memoryarray 230, and static memory array 232.

In one embodiment, the solid-state storage device controller 202includes a DMA controller 226 that controls DMA operations between thestorage device/solid-state storage device 206 and one or more externalmemory controllers 250 and associated external memory arrays 252 andCPUs 248. Note that the external memory controllers 250 and externalmemory arrays 252 are called external because they are external to thestorage device/solid-state storage device 206. In addition the DMAcontroller 226 may also control RDMA operations with requesting devicesthrough a NIC 244 and associated RDMA controller 246. DMA and RDMA areexplained in more detail below.

In one embodiment, the solid-state storage device controller 202includes a management controller 234 connected to a management bus 236.Typically the management controller 234 manages environmental metricsand status of the storage device/solid-state storage device 206. Themanagement controller 234 may monitor device temperature, fan speed,power supply settings, etc. over the management bus 236. The managementcontroller may support the reading and programming of erasableprogrammable read only memory (“EEPROM”) for storage of FPGA code andcontroller software.

Typically the management bus 236 is connected to the various componentswithin the storage device/solid-state storage device 206. The managementcontroller 234 may communicate alerts, interrupts, etc. over the localbus 209 or may include a separate connection to a system bus 240 orother bus. In one embodiment the management bus 236 is anInter-Integrated Circuit (“I²C”) bus. One of skill in the art willrecognize other related functions and uses of a management controller234 connected to components of the storage device/solid-state storagedevice 206 by a management bus 236.

In one embodiment, the solid-state storage device controller 202includes miscellaneous logic 242 that may be customized for a specificapplication. Typically where the solid-state device controller 202 ormaster controller 224 is/are configured using a FPGA or otherconfigurable controller, custom logic may be included based on aparticular application, customer requirement, storage requirement, etc.

Data Pipeline

FIG. 3 is a schematic block diagram illustrating one embodiment 300 of asolid-state storage controller 204 with a write data pipeline 301 and aread data pipeline 303 in a solid-state storage device 206 in accordancewith the present invention. The embodiment 300 includes a data bus 205,a local bus 209, and buffer control 208, which are substantially similarto those described in relation to the solid-state storage devicecontroller 202 of FIG. 2. The write data pipeline includes a packetizer302 and an error-correcting code (“ECC”) generator 304. In otherembodiments, the write data pipeline includes an input buffer 306, awrite synchronization buffer 308, a write program module 310, acompression module 312, an encryption module 314, a garbage collectorbypass 316 (with a portion within the read data pipeline), a mediaencryption module 318, and a write buffer 320.

The read data pipeline 303 includes a read synchronization buffer 328,an ECC correction module 322, a depacketizer 324, an alignment module326, and an output buffer 330. In other embodiments, the read datapipeline 303 may include a media decryption module 332, a portion of thegarbage collector bypass 316, a decryption module 334, a decompressionmodule 336, and a read program module 338. The solid-state storagecontroller 204 may also include control and status registers 340 andcontrol queues 342, a bank interleave controller 344, a synchronizationbuffer 346, a storage bus controller 348, and a multiplexer (“MUX”) 350.The components of the solid-state controller 204 and associated writedata pipeline 301 and read data pipeline 303 are described below. Inother embodiments, synchronous solid-state storage 207 may be used andsynchronization buffers 308 328 may be eliminated.

Write Data Pipeline

The write data pipeline 301 includes a packetizer 302 that receives adata or metadata segment to be written to the solid-state storage,either directly or indirectly through another write data pipeline 301stage, and creates one or more packets sized for the solid-state storage207. The data or metadata segment is typically part of an object, file,inode, or other data unit, but may also include an entire object, file,inode, etc. In another embodiment, the data segment is part of a logicalblock of data, but may also include an entire logical block. Typically,a data unit or portion of a data unit is received from a server 108,client 110, or other computer or device and is transmitted to thesolid-state storage device 206 in data segments streamed to thesolid-state storage device 206 or server 108. A data segment may be offixed length or variable and may also be known by another name, such asdata parcel, but as referenced herein includes all or a portion of adata unit, such as a file, object, logical block, etc.

Each data unit is stored as one or more packets. Each data unit may haveone or more container packets. Each packet contains a header. The headermay include a header type field. Type fields may include data, attributesuch as an object attribute, metadata, data segment delimiters(multi-packet), object or other structures, linkages, and the like. Theheader may also include information regarding the size of the packet,such as the number of bytes of data included in the packet. The lengthof the packet may be established by the packet type. The header mayinclude information that establishes the relationship of the packet tothe data unit, such as a logical identifier. An example might be alogical block address and offset using of an offset in a data packetheader to identify the location of the data segment within the dataunit. One of skill in the art will recognize other information that maybe included in a header added to data by a packetizer 302 and otherinformation that may be added to a data packet.

Each packet includes a header and possibly data from the data ormetadata segment. The header of each packet includes pertinentinformation to relate the packet to the data unit to which the packetbelongs. For example, the header may include an object identifier andoffset that indicates the data segment, object, logical block, or otherdata unit from which the data packet was formed. The header may alsoinclude a logical identifier used by the storage bus controller 348 tostore the packet. The header may also include information regarding thesize of the packet, such as the number of bytes included in the packet.The header may also include a sequence number that identifies where thedata segment belongs with respect to other packets within the data unitwhen reconstructing the data segment or data unit. The header mayinclude a header type field. Type fields may include data, objectattributes, metadata, data segment delimiters (multi-packet), objectstructures, object linkages, and the like. One of skill in the art willrecognize other information that may be included in a header added todata or metadata by a packetizer 302 and other information that may beadded to a packet.

The write data pipeline 301 includes an ECC generator 304 that generatesone or more error-correcting codes (“ECC”) for the one or more packetsreceived from the packetizer 302. The ECC generator 304 typically usesan error correcting algorithm to generate ECC which is stored with datapackets. The ECC stored with the packets is typically used to detect andcorrect errors introduced into the data through transmission andstorage. In one embodiment, packets are streamed into the ECC generator304 as un-encoded blocks of length N (“ECC block”). An ECC blocktypically has several packets, but may be a single packet. A packet mayspan multiple ECC blocks. An ECC block is typically smaller than alogical page, but in other embodiments may be larger than a singlelogical page. ECC blocks, packets, logical pages, logical erase blocks,and the like may be aligned or unaligned.

A syndrome of length S is calculated for the ECC block, appended andoutput as an encoded ECC chunk of length N+S. In a preferred embodiment,the syndrome S is for an ECC block that spans multiple physical pagessuch that one or more ECC blocks are stored in a logical page. The valueof N and S are dependent upon the characteristics of the algorithm whichis selected to achieve specific performance, efficiency, and robustnessmetrics. In the preferred embodiment, there is no fixed relationshipbetween the ECC blocks and the packets; the packet may comprise morethan one ECC block; the ECC block may comprise more than one packet; anda first packet may end anywhere within the ECC block and a second packetmay begin after the end of the first packet within the same ECC block.In the preferred embodiment, ECC algorithms are not dynamicallymodified. In a preferred embodiment, the ECC stored with the datapackets is robust enough to correct errors in more than two bits.

Beneficially, using a robust ECC algorithm allowing more than single bitcorrection or even double bit correction allows the life of thesolid-state storage 207 to be extended. For example, if flash memory isused as the storage medium in the solid-state storage 207, the flashmemory may be written approximately 100,000 times without error pererase cycle. This usage limit may be extended using a robust ECCalgorithm. Having the ECC generator 304 and corresponding ECC correctionmodule 322 onboard the solid-state storage device 206, the solid-statestorage device 206 can internally correct errors and has a longer usefullife than if a less robust ECC algorithm is used, such as single bitcorrection. One example of using an ECC chunk spread across storageelements for reducing wear in a storage device 106 is described in moredetail in U.S. patent application Ser. No. 12/468,041, titled Apparatus,System, and Method to Increase Data Integrity in a Redundant StorageSystem, to Jonathan Thatcher, et al., filed May 18, 2009 and in U.S.patent application Ser. No. 12/468,040, titled Apparatus, System, andMethod for Reconfiguring an Array to Operate with Less Storage Elements,to Jonathan Thatcher, et al., filed May 18, 2009. The applicationsdescribe using both ECC protection and parity information to effectivelydetect errors and then to reconfigure an array if a storage element isfound to be in error.

However, in other embodiments the ECC generator 304 may use a lessrobust algorithm and may correct single-bit or double-bit errors. Inanother embodiment, the solid-state storage device 206 may comprise lessreliable storage such as multi-level cell (“MLC”) flash in order toincrease capacity, which storage may not be sufficiently reliablewithout more robust ECC algorithms.

In one embodiment, the write data pipeline 301 includes an input buffer306 that receives data segments to be written to the solid-state storage207 and stores the incoming data segments until the next stage of thewrite data pipeline 301, such as the packetizer 302 (or other stage fora more complex write data pipeline 301) is ready to process the nextdata segment. The input buffer 306 typically allows for discrepanciesbetween the rate data segments are received and processed by the writedata pipeline 301 using an appropriately sized data buffer. The inputbuffer 306 also allows the data bus 205 to transfer data to the writedata pipeline 301 at rates greater than can be sustained by the writedata pipeline 301 in order to improve efficiency of operation of thedata bus 205. Typically when the write data pipeline 301 does notinclude an input buffer 306, a buffering function is performedelsewhere, such as in the solid-state storage device 206 but outside thewrite data pipeline 301, in the server 108, such as within a networkinterface card (“NIC”), or at another device, for example when usingremote direct memory access (“RDMA”).

Data may stream into the input buffer 306 from one or more clients 110or file servers 114/file system. Typically the data is input into theinput buffer 306 in an order of arrival from the clients 110 and/or fileservers 114/file system. The data may then be stored in order ofarrival, sequentially rather than separated out by client 110 or fileserver 114/file system. In a sequential storage device, the data fromvarious sources can be interspersed because the index and metadata canbe used to track the source of the data.

In another embodiment, the write data pipeline 301 also includes a writesynchronization buffer 308 that buffers packets received from the ECCgenerator 304 prior to writing the packets to the solid-state storage207. The write synch buffer 308 is located at a boundary between a localclock domain and a solid-state storage clock domain and providesbuffering to account for the clock domain differences. In otherembodiments, synchronous solid-state storage 207 may be used andsynchronization buffers 308 328 may be eliminated.

In one embodiment, the write data pipeline 301 also includes a mediaencryption module 318 that receives the one or more packets from thepacketizer 302, either directly or indirectly, and encrypts the one ormore packets using an encryption key unique to the solid-state storagedevice 206 prior to sending the packets to the ECC generator 304.Typically, the entire packet is encrypted, including the headers. Inanother embodiment, headers are not encrypted. In this document,encryption key is understood to mean a secret encryption key that ismanaged externally from an embodiment that integrates the solid-statestorage 207 and where the embodiment requires encryption protection.

The media encryption module 318 and corresponding media decryptionmodule 332 provide a level of security for data stored in thesolid-state storage 207. For example, where data is encrypted with themedia encryption module 318, if the solid-state storage 207 is connectedto a different solid-state storage controller 204, solid-state storagedevice 206, or server 108, the contents of the solid-state storage 207typically could not be read without use of the same encryption key usedduring the write of the data to the solid-state storage 207 withoutsignificant effort.

In a typical embodiment, the solid-state storage device 206 does notstore the encryption key in non-volatile storage and allows no externalaccess to the encryption key. The encryption key is provided to thesolid-state storage controller 204 during initialization. The solid-satestorage device 206 may use and store a non-secret cryptographic noncethat is used in conjunction with an encryption key. A different noncemay be stored with every packet. Data segments may be split betweenmultiple packets with unique nonces for the purpose of improvingprotection by the encryption algorithm.

The encryption key may be received from a client 110, a server 108, keymanager, or other device that manages the encryption key to be used bythe solid-state storage controller 204. In another embodiment, thesolid-state storage 207 may have two or more partitions and thesolid-state storage controller 204 behaves as though it were two or moresolid-state storage controllers 204, each operating on a singlepartition within the solid-state storage 207. In this embodiment, aunique media encryption key may be used with each partition.

In another embodiment, the write data pipeline 301 also includes anencryption module 314 that encrypts a data or metadata segment receivedfrom the input buffer 306, either directly or indirectly, prior sendingthe data segment to the packetizer 302, the data segment encrypted usingan encryption key received in conjunction with the data segment. Theencryption module 314 differs from the media encryption module 318 inthat the encryption keys used by the encryption module 318 to encryptdata may not be common to all data stored within the solid-state storagedevice 206 but may vary on a data unit basis and received in conjunctionwith receiving data segments as described below.

For example, an encryption key for a data segment to be encrypted by theencryption module 318 may be received with the data segment or may bereceived as part of a command to write a data unit to which the datasegment belongs. The solid-sate storage device 206 may use and store anon-secret cryptographic nonce in each data packet that is used inconjunction with the encryption key. A different nonce may be storedwith every packet. Data segments may be split between multiple packetswith unique nonces for the purpose of improving protection by theencryption algorithm. In one embodiment, the nonce used by the mediaencryption module 318 is the same as that used by the encryption module314.

The encryption key may be received from a client 110, a server 108, keymanager, or other device that holds the encryption key to be used toencrypt the data segment. In one embodiment, encryption keys aretransferred to the solid-state storage controller 204 from one of asolid-state storage device 206, server 108, client 110, or otherexternal agent which has the ability to execute industry standardmethods to securely transfer and protect private and public keys.

In one embodiment, the encryption module 318 encrypts a first packetwith a first encryption key received in conjunction with the packet andencrypts a second packet with a second encryption key received inconjunction with the second packet. In another embodiment, theencryption module 318 encrypts a first packet with a first encryptionkey received in conjunction with the packet and passes a second datapacket on to the next stage without encryption. Beneficially, theencryption module 318 included in the write data pipeline 301 of thesolid-state storage device 206 allows data unit-by-data unit orsegment-by-segment data encryption without a single file server 114/filesystem or other external system to keep track of the differentencryption keys used to store corresponding data units or data segments.Each requesting device 155 or related key manager independently managesencryption keys used to encrypt only the data units or data segmentssent by the requesting device 155.

In another embodiment, the write data pipeline 301 includes acompression module 312 that compresses the data for metadata segmentprior to sending the data segment to the packetizer 302. The compressionmodule 312 typically compresses a data or metadata segment using acompression routine known to those of skill in the art to reduce thestorage size of the segment. For example, if a data segment includes astring of 512 zeros, the compression module 312 may replace the 512zeros with code or token indicating the 512 zeros where the code is muchmore compact than the space taken by the 512 zeros.

In one embodiment, the compression module 312 compresses a first segmentwith a first compression routine and passes along a second segmentwithout compression. In another embodiment, the compression module 312compresses a first segment with a first compression routine andcompresses the second segment with a second compression routine. Havingthis flexibility within the solid-state storage device 206 is beneficialso that clients 110 or other devices writing data to the solid-statestorage device 206 may each specify a compression routine or so that onecan specify a compression routine while another specifies nocompression. Selection of compression routines may also be selectedaccording to default settings on a per data unit type or data unit classbasis. For example, a first data unit of a specific data unit may beable to override default compression routine settings and a second dataunit of the same data unit class and data unit type may use the defaultcompression routine and a third data unit of the same data unit classand data unit type may use no compression.

In one embodiment, the write data pipeline 301 includes a garbagecollector bypass 316 that receives data segments from the read datapipeline 303 as part of a data bypass in a garbage collection system. Agarbage collection system typically marks packets that are no longervalid, typically because the packet is marked for deletion or has beenmodified and the modified data is stored in a different location. Atsome point, the garbage collection system determines that a particularsection of storage, such as a logical erase block, may be recovered.This determination may be due to a lack of available storage capacity,the percentage of data marked as invalid reaching a threshold, aconsolidation of valid data, an error detection rate for that section ofstorage reaching a threshold, or improving performance based on datadistribution, etc. Numerous factors may be considered by a garbagecollection algorithm to determine when a section of storage is to berecovered.

Once a section of storage has been marked for recovery, valid packets inthe section typically must be relocated. The garbage collector bypass316 allows packets to be read into the read data pipeline 303 and thentransferred directly to the write data pipeline 301 without being routedout of the solid-state storage controller 204. In a preferredembodiment, the garbage collector bypass 316 is part of an autonomousgarbage collector system that operates within the solid-state storagedevice 206. This allows the solid-state storage device 206 to managedata so that data is systematically spread throughout the solid-statestorage 207 to improve performance, data reliability and to avoidoveruse and underuse of any one location or area of the solid-statestorage 207 and to lengthen the useful life of the solid-state storage207.

The garbage collector bypass 316 coordinates insertion of segments intothe write data pipeline 301 with other segments being written by one ormore clients 110 or other devices. In the depicted embodiment, thegarbage collector bypass 316 is before the packetizer 302 in the writedata pipeline 301 and after the depacketizer 324 in the read datapipeline 303, but may also be located elsewhere in the read and writedata pipelines 303, 301. The garbage collector bypass 316 may be usedduring a flush of the write data pipeline 301 to fill the remainder ofthe logical page in order to improve the efficiency of storage withinthe Solid-state storage 207 and thereby reduce the frequency of garbagecollection.

In one embodiment, the write data pipeline 301 includes a write buffer320 that buffers data for efficient write operations. Typically, thewrite buffer 320 includes enough capacity for packets to fill at leastone logical page in the solid-state storage 207. This allows a writeoperation to send an entire page of data to the solid-state storage 207without interruption. The logical page may include more than one ECCchunk. By sizing the write buffer 320 of the write data pipeline 301 andbuffers within the read data pipeline 303 to be the same capacity orlarger than a storage write buffer within the solid-state storage 207,writing and reading data is more efficient since a single write commandmay be crafted to send a full logical page of data to the solid-statestorage 207 instead of multiple commands. In another embodiment,contents of the write buffer 302 with less than a logical page arewritten to the solid-state storage 207.

While the write buffer 320 is being filled, the solid-state storage 207may be used for other read operations. This is advantageous becauseother solid-state devices with a smaller write buffer or no write buffermay tie up the solid-state storage when data is written to a storagewrite buffer and data flowing into the storage write buffer stalls. Readoperations will be blocked until the entire storage write buffer isfilled and programmed. Another approach for systems without a writebuffer or a small write buffer is to flush the storage write buffer thatis not full in order to enable reads. Again this is inefficient becausemultiple write/program cycles are required to fill a page.

For depicted embodiments with a write buffer 320 sized larger than alogical page, a single write command, which includes numeroussubcommands, can then be followed by a single program command totransfer the page of data from the storage write buffer in eachsolid-state storage element 216, 218, 220 to the designated page withineach solid-state storage element 216, 218, 220. This technique has thebenefits of eliminating partial page programming, which is known toreduce data reliability and durability and freeing up the destinationbank for reads and other commands while the buffer fills.

In one embodiment, the write buffer 320 is a ping-pong buffer where oneside of the buffer is filled and then designated for transfer at anappropriate time while the other side of the ping-pong buffer is beingfilled. In another embodiment, the write buffer 320 includes a first-infirst-out (“FIFO”) register with a capacity of more than a logical pageof data segments. One of skill in the art will recognize other writebuffer 320 configurations that allow a logical page of data to be storedprior to writing the data to the solid-state storage 207.

In another embodiment, the write buffer 320 is sized smaller than alogical page so that less than a page of information could be written toa storage write buffer in the solid-state storage 207. In theembodiment, to prevent a stall in the write data pipeline 301 fromholding up read operations, data is queued using the garbage collectionsystem that needs to be moved from one location to another as part ofthe garbage collection process. In case of a data stall in the writedata pipeline 301, the data can be fed through the garbage collectorbypass 316 to the write buffer 320 and then on to the storage writebuffer in the solid-state storage 207 to fill the pages of a logicalpage prior to programming the data. In this way a data stall in thewrite data pipeline 301 would not stall reading from the solid-statestorage device 106.

In another embodiment, the write data pipeline 301 includes a writeprogram module 310 with one or more user-definable functions within thewrite data pipeline 301. The write program module 310 allows a user tocustomize the write data pipeline 301. A user may customize the writedata pipeline 301 based on a particular data requirement or application.Where the solid-state storage controller 204 is an FPGA, the user mayprogram the write data pipeline 301 with custom commands and functionsrelatively easily. A user may also use the write program module 310 toinclude custom functions with an ASIC, however, customizing an ASIC maybe more difficult than with an FPGA. The write program module 310 mayinclude buffers and bypass mechanisms to allow a first data segment toexecute in the write program module 310 while a second data segment maycontinue through the write data pipeline 301. In another embodiment, thewrite program module 310 may include a processor core that can beprogrammed through software.

Note that the write program module 310 is shown between the input buffer306 and the compression module 312, however, the write program module310 could be anywhere in the write data pipeline 301 and may bedistributed among the various stages 302-320. In addition, there may bemultiple write program modules 310 distributed among the various states302-320 that are programmed and operate independently. In addition, theorder of the stages 302-320 may be altered. One of skill in the art willrecognize workable alterations to the order of the stages 302-320 basedon particular user requirements.

Read Data Pipeline

The read data pipeline 303 includes an ECC correction module 322 thatdetermines if a data error exists in ECC blocks a requested packetreceived from the solid-state storage 207 by using ECC stored with eachECC block of the requested packet. The ECC correction module 322 thencorrects any errors in the requested packet if any error exists and theerrors are correctable using the ECC. For example, if the ECC can detectan error in six bits but can only correct three bit errors, the ECCcorrection module 322 corrects ECC blocks of the requested packet withup to three bits in error. The ECC correction module 322 corrects thebits in error by changing the bits in error to the correct one or zerostate so that the requested data packet is identical to when it waswritten to the solid-state storage 207 and the ECC was generated for thepacket.

If the ECC correction module 322 determines that the requested packetscontains more bits in error than the ECC can correct, the ECC correctionmodule 322 cannot correct the errors in the corrupted ECC blocks of therequested packet and sends an interrupt. In one embodiment, the ECCcorrection module 322 sends an interrupt with a message indicating thatthe requested packet is in error. The message may include informationthat the ECC correction module 322 cannot correct the errors or theinability of the ECC correction module 322 to correct the errors may beimplied. In another embodiment, the ECC correction module 322 sends thecorrupted ECC blocks of the requested packet with the interrupt and/orthe message.

In the preferred embodiment, a corrupted ECC block or portion of acorrupted ECC block of the requested packet that cannot be corrected bythe ECC correction module 322 is read by the master controller 224,corrected, and returned to the ECC correction module 322 for furtherprocessing by the read data pipeline 303. In one embodiment, a corruptedECC block or portion of a corrupted ECC block of the requested packet issent to the device requesting the data. The requesting device 155 maycorrect the ECC block or replace the data using another copy, such as abackup or mirror copy, and then may use the replacement data of therequested data packet or return it to the read data pipeline 303. Therequesting device 155 may use header information in the requested packetin error to identify data required to replace the corrupted requestedpacket or to replace the data unit to which the packet belongs.

In another preferred embodiment, the solid-state storage controller 204stores data using some type of RAID and is able to recover the corrupteddata. In another embodiment, the ECC correction module 322 sends andinterrupt and/or message and the receiving device fails the readoperation associated with the requested data packet. One of skill in theart will recognize other options and actions to be taken as a result ofthe ECC correction module 322 determining that one or more ECC blocks ofthe requested packet are corrupted and that the ECC correction module322 cannot correct the errors, even after a retry of the operation.

The read data pipeline 303 includes a depacketizer 324 that receives ECCblocks of the requested packet from the ECC correction module 322,directly or indirectly, and checks and removes one or more packetheaders. The depacketizer 324 may validate the packet headers bychecking packet identifiers, data length, data location, etc. within theheaders. In one embodiment, the header includes a hash code that can beused to validate that the packet delivered to the read data pipeline 303is the requested packet. The depacketizer 324 also removes the headersfrom the requested packet added by the packetizer 302. The depacketizer324 may directed to not operate on certain packets but pass theseforward without modification. An example might be a container label thatis requested during the course of a rebuild process where the headerinformation is required to rebuild the index. Further examples includethe transfer of packets of various types destined for use within thesolid-state storage device 206. In another embodiment, the depacketizer324 operation may be packet type dependent.

The read data pipeline 303 includes an alignment module 326 thatreceives data from the depacketizer 324 and removes unwanted data. Inone embodiment, a read command sent to the solid-state storage 207retrieves a packet of data. A device requesting the data may not requireall data within the retrieved packet and the alignment module 326removes the unwanted data. If all data within a retrieved page isrequested data, the alignment module 326 does not remove any data.

The alignment module 326 re-formats the data as data segments of a dataunit in a form compatible with a device requesting the data segmentprior to forwarding the data segment to the next stage. Typically, asdata is processed by the read data pipeline 303, the size of datasegments or packets changes at various stages. The alignment module 326uses received data to format the data into data segments suitable to besent to the requesting device 155 and joined to form a response. Forexample, data from a portion of a first data packet may be combined withdata from a portion of a second data packet. If a data segment is largerthan a data requested by the requesting device, the alignment module 326may discard the unwanted data.

In one embodiment, the read data pipeline 303 includes a readsynchronization buffer 328 that buffers one or more requested packetsread from the solid-state storage 207 prior to processing by the readdata pipeline 303. The read synchronization buffer 328 is at theboundary between the solid-state storage clock domain and the local busclock domain and provides buffering to account for the clock domaindifferences.

In another embodiment, the read data pipeline 303 includes an outputbuffer 330 that receives requested packets from the alignment module 326and stores the packets prior to transmission to the requesting device.The output buffer 330 accounts for differences between when datasegments are received from stages of the read data pipeline 303 and whenthe data segments are transmitted to other parts of the solid-statestorage controller 204 or to a requesting device, client 110, fileserver 114, etc. The output buffer 330 also allows the data bus 205 toreceive data from the read data pipeline 303 at rates greater than canbe sustained by the read data pipeline 303 in order to improveefficiency of operation of the data bus 205.

In one embodiment, the read data pipeline 303 includes a mediadecryption module 332 that receives one or more encrypted requestedpackets from the ECC correction module 322 and decrypts the one or morerequested packets using the encryption key unique to the solid-statestorage device 206 prior to sending the one or more requested packets tothe depacketizer 324. Typically the encryption key used to decrypt databy the media decryption module 332 is identical to the encryption keyused by the media encryption module 318. In another embodiment, thesolid-state storage 207 may have two or more partitions and thesolid-state storage controller 204 behaves as though it were two or moresolid-state storage controllers 204 each operating on a single partitionwithin the solid-state storage 207. In this embodiment, a unique mediaencryption key may be used with each partition.

In another embodiment, the read data pipeline 303 includes a decryptionmodule 334 that decrypts a data segment formatted by the depacketizer324 prior to sending the data segment to the output buffer 330. The datasegment decrypted using an encryption key received in conjunction withthe read request that initiates retrieval of the requested packetreceived by the read synchronization buffer 328. The decryption module334 may decrypt a first packet with an encryption key received inconjunction with the read request for the first packet and then maydecrypt a second packet with a different encryption key or may pass thesecond packet on to the next stage of the read data pipeline 303 withoutdecryption. Typically, the decryption module 334 uses a differentencryption key to decrypt a data segment than the media decryptionmodule 332 uses to decrypt requested packets. When the packet was storedwith a non-secret cryptographic nonce, the nonce is used in conjunctionwith an encryption key to decrypt the data packet. The encryption keymay be received from a client 110, a server 108, key manager, or otherdevice that manages the encryption key to be used by the solid-statestorage controller 204.

In another embodiment, the read data pipeline 303 includes adecompression module 336 that decompresses a data segment formatted bythe depacketizer 324. In the preferred embodiment, the decompressionmodule 336 uses compression information stored in one or both of thepacket header and the container label to select a complementary routineto that used to compress the data by the compression module 312. Inanother embodiment, the decompression routine used by the decompressionmodule 336 is dictated by the device requesting the data segment beingdecompressed. In another embodiment, the decompression module 336selects a decompression routine according to default settings on a perdata unit type or data unit class basis. A first packet of a first dataunit may be able to override a default decompression routine and asecond packet of a second data unit of the same data unit class and dataunit type may use the default decompression routine and a third packetof a third data unit of the same data unit class and data unit type mayuse no decompression.

In another embodiment, the read data pipeline 303 includes a readprogram module 338 that includes one or more user-definable functionswithin the read data pipeline 303. The read program module 338 hassimilar characteristics to the write program module 310 and allows auser to provide custom functions to the read data pipeline 303. The readprogram module 338 may be located as shown in FIG. 3, may be located inanother position within the read data pipeline 303, or may includemultiple parts in multiple locations within the read data pipeline 303.Additionally, there may be multiple read program modules 338 withinmultiple locations within the read data pipeline 303 that operateindependently. One of skill in the art will recognize other forms of aread program module 338 within a read data pipeline 303. As with thewrite data pipeline 301, the stages of the read data pipeline 303 may berearranged and one of skill in the art will recognize other orders ofstages within the read data pipeline 303.

The solid-state storage controller 204 includes control and statusregisters 340 and corresponding control queues 342. The control andstatus registers 340 and control queues 342 facilitate control andsequencing commands and subcommands associated with data processed inthe write and read data pipelines 301, 303. For example, a data segmentin the packetizer 302 may have one or more corresponding controlcommands or instructions in a control queue 342 associated with the ECCgenerator 304. As the data segment is packetized, some of theinstructions or commands may be executed within the packetizer 302.Other commands or instructions may be passed to the next control queue342 through the control and status registers 340 as the newly formeddata packet created from the data segment is passed to the next stage.

Commands or instructions may be simultaneously loaded into the controlqueues 342 for a packet being forwarded to the write data pipeline 301with each pipeline stage pulling the appropriate command or instructionas the respective packet is executed by that stage. Similarly, commandsor instructions may be simultaneously loaded into the control queues 342for a packet being requested from the read data pipeline 303 with eachpipeline stage pulling the appropriate command or instruction as therespective packet is executed by that stage. One of skill in the artwill recognize other features and functions of control and statusregisters 340 and control queues 342.

The solid-state storage controller 204 and or solid-state storage device206 may also include a bank interleave controller 344. The bankinterleave controller 344 coordinates writing, reading, erasing, etc.between banks. Typically, erasing a logical erase block takes longerthan writing a logical page and reading takes less time than writing alogical page. By coordinating commands between banks, the bankinterleave controller 344 increases efficiency in the solid-statestorage device 202. A more detailed description of the bank interleavecontroller 344 is described in U.S. application Ser. No. 11/952,095,titled Apparatus, System, and Method for Managing Commands ofSolid-State Storage Using Bank Interleave, to David Flynn, et al., filedDec. 6, 2007.

The solid-state storage controller 204 includes a synchronization buffer346 that buffers commands and status messages sent and received from thesolid-state storage 207. The synchronization buffer 346 is located atthe boundary between the solid-state storage clock domain and the localbus clock domain and provides buffering to account for the clock domaindifferences. The synchronization buffer 346, write synchronizationbuffer 308, and read synchronization buffer 328 may be independent ormay act together to buffer data, commands, status messages, etc. In thepreferred embodiment, the synchronization buffer 346 is located wherethere are the fewest number of signals crossing the clock domains. Oneskilled in the art will recognize that synchronization between clockdomains may be arbitrarily moved to other locations within thesolid-state storage device 202 in order to optimize some aspect ofdesign implementation.

The solid-state storage controller 204 includes a storage bus controller348 that interprets and translates commands for data sent to and readfrom the solid-state storage 110 and status messages received from thesolid-state storage 207 based on the type of solid-state storage 207.For example, the storage bus controller 348 may have different timingrequirements for different types of storage, storage with differentperformance characteristics, storage from different manufacturers, etc.The storage bus controller 348 also sends control commands to thestorage control bus 212.

In the preferred embodiment, the solid-state storage controller 204includes a MUX 350 that comprises an array of multiplexers 350 a-n whereeach multiplexer is dedicated to a row in the solid-state storage array207. For example, multiplexer 350 a is associated with solid-statestorage elements 216 a, 218 a, 220 a. MUX 350 routes the data from thewrite data pipeline 301 and commands from the storage bus controller 348to the solid-state storage 207 via the storage I/O bus 210 and routesdata and status messages from the solid-state storage 207 via thestorage I/O bus 210 to the read data pipeline 303 and the control andstatus registers 340 through the storage bus controller 348,synchronization buffer 346, and bank interleave controller 344.

In the preferred embodiment, the solid-state storage controller 204includes a MUX 350 for each row of solid-state storage elements (e.g.SSS 0.1 216 a, SSS 0.2 218 a, SSS 0.N 220 a). A MUX 350 combines datafrom the write data pipeline 301 and commands sent to the solid-statestorage 207 via the storage I/O bus 210 and separates data to beprocessed by the read data pipeline 303 from commands. Packets stored inthe write buffer 320 are directed on busses out of the write buffer 320through a write synchronization buffer 308 for each row of solid-statestorage elements (SSS x.0 to SSS x.N 216, 218, 220) to the MUX 350 foreach row of solid-state storage elements (SSS x.0 to SSS x.N 216, 218,220). The commands and read data are received by the MUXes 350 from thestorage I/O bus 210. The MUXes 350 also direct status messages to thestorage bus controller 348.

Allocation Apparatus

FIG. 4 is a schematic block diagram illustrating an embodiment of anapparatus 400 to allocate data storage space in accordance with thepresent invention. The apparatus 400 includes an allocation requestmodule 402, a logical capacity module 404, and an allocation replymodule 406, which are described below. The allocation request module402, the logical capacity module 404, and the allocation reply module406 are depicted in the storage system 102 in general, but all or partof the allocation request module 402, the logical capacity module 404,and the allocation reply module 406 may be in a storage controller 104,driver 118, or other location in the storage system 102.

The apparatus 400 includes an allocation request module 402 thatreceives from a requesting device an allocation request to allocatelogical capacity. The requesting device may be a file server 114/filesystem, a client 110, a master allocation manager 124, or any otherdevice or component capable of sending an allocation request. Theallocation request is received at a data storage device. In oneembodiment, the data storage device includes a storage device 106 asshown and at least a storage controller 104 controlling the storagedevice 106 and may include a driver 118 coupled to the storagecontroller 104. The logical capacity associated with the allocationrequest is for storing data specifically on the data storage device thatis the target of the allocation request.

The allocation request may include a logical allocation request or mayinclude a request to store data. In the case of a logical allocationrequest, the request is typically a request for LIDs to be allocated toa client 110. In the case of a request to store data, one or more LIDsare allocated to a client 110 or file server 114/file system, and areassigned, which may comprise associating the LIDs with storage locationscomprising the data. In one embodiment, the LIDs are assigned to thedata at the time of allocation (e.g., the allocation request maycomprise a request to store data). In another embodiment, where theallocation request is separate from a request to store data, allocatingLIDs to the data may be in a separate step from assigning the LIDs tothe data. In certain embodiments, the request comes from a plurality ofclients, consequently a client identifier may be associated with therequest, the apparatus 400 may use the client identifier to implement anaccess control with respect to allocations for that client and/or withrespect to the LIDS available to allocate to the client. In addition,the client identifier may be used to manage how much physical capacityis allocated to a particular client or set of clients.

The apparatus 400 includes a logical capacity module 404 that determinesif a logical space of the data storage device includes sufficientunallocated logical space to satisfy the allocation request. The logicalcapacity module 404 may determines if the logical space has sufficientunassigned and/or unallocated logical capacity using an index (or otherdatastructure) maintaining LID assignments and/or allocations. In someembodiments, the logical capacity module 404 may search alogical-to-physical map or index maintained on the non-volatile storagedevice. The logical-to-physical map includes associations betweenassigned logical identifiers (“LIDs”) in the logical space and storagelocations (e.g., physical locations) comprising data corresponding tothe associated LIDs. However, other datastructures and/or techniques fordetermining logical capacity may be used under the teachings of thisdisclosure. Accordingly, the disclosure should not be read as limited inthis regard. Additional examples of determining available logicalcapacity (e.g., unallocated and/or unassigned logical capacity) and/oravailable physical storage capacity are disclosed below in conjunctionwith FIGS. 11 and 12.

As discussed above, unassigned LIDs may refer to LIDs that do notcorrespond to data stored on the non-volatile storage device (e.g. arenot in the logical-to-physical map). An unassigned LID may be allocatedto a client 110 or may be unallocated. In some embodiments, thelogical-to-physical map is configured such that there are no otherlogical-to-logical mappings between the LIDs in the map and physicaladdresses associated with the LIDs.

The LIDs in the logical-to-physical map, managed at the data storagedevice, may include any type of logical address, such as an LBA, anindex, a file name, and an inode, and may include objects. Specifically,the logical-to-physical map is not limited to objects or any specificlogical address type but may include objects as well as file names,LBAs, etc. In another embodiment, a LID includes logical identifiersother than an object identifier and objects are not managed directly bythe data storage device. The apparatus 400 is advantageous because thelogical-to-physical map of the data storage device as well as themodules 402-406 of the apparatus 400 are not limited to objects, but theLIDs can also be LBAs and other data unit labels, which expands thescope and flexibility of the apparatus 400.

In some embodiments, the logical capacity module 404 searches thelogical-to-physical map to identify assigned LIDs and, by knowing thelogical space of the data storage device, the logical capacity module404 determines unallocated logical space. For example, if a logicalspace includes a range of logical addresses from 0000 to FFFF andlogical-to-physical map indicates that the logical addresses 0000 toF000 are assigned, the logical capacity module 404 may determine thatthe unallocated logical space may include addresses F001 to FFFF. If thelogical addresses F001 to FFFF are not allocated to another client 110,they may be available for allocation to satisfy the allocation request.

In some embodiments, the non-volatile storage device may maintainseparate logical storage spaces for different respective clients.Accordingly, each client may operate its own, separate logical storagespace. The non-volatile storage device may, therefore, maintain separatemetadata (e.g., indexes, capacity indicators, and so on), for eachclient. Clients may be distinguished by address (e.g., network address),a credential, or other identifier. The identifiers may be provided inclient requests and/or may be associated with a communication channel orprotocol used by the client to access the non-volatile storage device.

In some embodiments, the logical-to-physical map (or otherdatastructure) may comprise an allocation index or allocation entriesconfigured to track logical capacity allocations that have not yet beenassigned. For example, a LID (or other portion of logical capacity) maybe allocated to a client, but may not be associated with data stored onthe storage device 106. Accordingly, although the logical capacity maybe allocated, it may be “unassigned,” and as such, may not be includedin the logical-to-physical map. Accordingly, when determining theunallocated logical space, the logical capacity module 404 may consultadditional data structures (e.g., allocation index or allocationentries) in addition to other indexing information (e.g., the logical tophysical map).

Alternatively, or in addition, the non-volatile storage device maymaintain an “unallocated index” which may identify LIDs (or otherportions of logical capacity) that are unallocated. Examples of anavailability index are described below in conjunction with FIG. 12.

If, for example, the allocation request includes a request for a certainnumber of LIDs, the logical capacity module 404 can determine if theavailable logical space (e.g. unassigned and/or unallocated logicalcapacity) is sufficient to meet or exceed the requested amount oflogical addresses. In another example, if the allocation requestincludes a list or range of LIDs, the logical capacity module 404 candetermine if the LIDs for all or a portion of the LIDs requested areunallocated or unassigned.

In a typical random access device, typically LIDs are LBAs and LBAsmatch physical block addresses (“PBAs”) according to a pre-determinedmapping. By contrast, in a sequential storage device, a log structureddevice, or the like, an assigned LID differs from the one or morephysical addresses mapped to the assigned LID (e.g., there may be nopre-set or pre-determined mapping from LID to storage location). In sucha data storage device data may be moved by a garbage collection processor other space recovery process and data is tracked in thelogical-to-physical map. Typically an assigned LID in a sequential orlog storage device is related to a mapped physical address only by theindex (e.g., logical-to-physical mapping).

For a sequential storage device, log structured device, and the like,the logical-to-physical mapping may change for various reasons. In oneembodiment, the mapping of one or more LIDs to one or more physicaladdresses changes when the data stored at the one or more physicaladdresses is moved to one or more different physical addresses. Inanother embodiment, the mapping of one or more LIDs to one or morephysical addresses changes in a deduplication process. For example whenthe data stored at the one or more physical addresses is stored at afirst physical location and is identical to data stored at a secondphysical location and the mapping of the one or more LIDs is changed tocorrespond to the second physical location.

In another embodiment, the mapping of one or more LIDs to one or morephysical addresses changes when the one or more physical locationsmapped to the one or more LIDs (“first LIDs”) are remapped to one ormore different LIDs (“second LIDs”). This may occur if a file or objectname changes, for example. In a storage device where there are nopre-determined and/or pre-set associations between LID and physicalstorage locations and/or data may be moved and the associations betweenLIDs and the physical storage locations may change, alogical-to-physical indexing may be used. Since the storage devicealready maintains associations between logical addresses and storagelocations on the storage device, client address translations may beobviated; there is no need for the client to maintain a separate,redundant set of mappings. Accordingly, one or more mapping and/oraddress translation layers between the client and the storage device maybe eliminated, reducing the processing load of the client.

The apparatus 400 includes an allocation reply module 406 thatcommunicates a reply to the requesting device in response to the logicalcapacity module 404 determining if the logical space has sufficientlogical space. The reply includes an indication of whether the logicalspace has sufficient logical space to satisfy the allocation request.For example, if the logical capacity module 404 determines that theunallocated logical space is insufficient to satisfy the allocationrequest, the allocation reply module 406 may include in the reply thatthe allocation request failed.

If for example, the logical capacity module 404 determines that theunallocated logical space is sufficient to satisfy the allocationrequest, the allocation reply module 406 may include in the reply anaffirmative response, a list of LIDs, a range of LIDs, etc. dependingupon the nature of the allocation request. If, for example, the logicalcapacity module 404 determines that the unallocated logical space issufficient to satisfy the allocation request and the allocation requestincludes a request to allocate specific LIDs, the reply module 406 maycommunicate an acknowledgement to the requesting device that requestedLIDs were allocated. If the allocation request includes a request forLIDs, the allocation reply module 406 may communicate the requestedLIDs. If the allocation request includes a request for LIDs that meetcriteria, the allocation reply module 406 may communicate LIDs that meetthe criteria.

In one embodiment, the allocation request is for a specific group ofLIDs and the allocation reply module 406 may reply with the requestedLIDs. In another embodiment, the allocation request is part of a writerequest. In one case the write request includes specific LIDs and theallocation reply module 406 may reply with the requested LIDs. Inanother case the write request only includes data or an indication of anamount of data and the allocation reply module 406 may reply byallocating LIDS sufficient for the write request and returning theallocated LIDS. Alternatively, if an indication of an amount of data isprovided the reply may include LIDs that are unallocated. The allocationreply module 406 may reply before or after the data is written. If theallocation reply module 406 sends a reply after the data is written, thereply may be part of a confirmation of writing the data. One of skill inthe art will recognize other ways that the allocation reply module 406may reply in response to the logical capacity module 404 determining ifthe logical space of the data storage device has sufficient unallocatedlogical space to satisfy an allocation request.

In one embodiment, a storage capacity corresponding to the logical space(“logical space capacity”) is substantially larger than a physicalstorage capacity of the data storage device. The logical space capacityincludes the unallocated logical space combined with allocated logicalspace. The allocated logical space comprising the assigned LIDs andunassigned LIDs within the allocated logical space. In other words, thedata storage device and the associated logical-to-physical mappingsupport thin provisioning. In the case where a logical identifier is anLBA, each LBA typically has a defined data size. In certain embodiments,an LBA is assigned to a logical block and often a logical block is thesame size as a physical block on the storage device 106.

In one embodiment, a subset of the LIDs of the logical space of the datastorage device has a one-to-one correspondence to physical blocks withinthe data storage device. For example, if a portion of the logical spaceis allocated to a client 110 and the client 110 stores logical blocks sofor the client 110 a LID is an LBA, each LBA may correspond to aphysical address that is equivalent to a physical block address (“PBA”).The logical space available to the data storage device may stillaccommodate allocation to other clients 110 and may still be thinlyprovisioned.

While it is common that logical identifiers are logical block addresses,in the apparatus 400 of FIG. 4 logical identifiers can be much more. Alogical identifier can be a logical address (“LA”), a logical blockaddress (“LBA”), a file name, a file address, an object identifier, aninode, an index, etc. Where the storage system 102, server 108, etc.uses a 64 or 128 bit address to represent LIDs, the possible logicalidentifiers for addressing this logical space (i.e. logical space)becomes enormous. Certain amount of bits in an address may be dedicatedto a logical space and other bits in the address may carry otherinformation, such as identification of a client, error correctioninformation, attributes relating the data request such as the priority,data type, integrity requirements etc. Using only a portion of bits inan address, for example using 32 bits, provides a very large addressspace. In one embodiment, metadata hints (e.g. file types, data classes,etc.) are passed from client (e.g. FS) to the storage device. Thesemetadata hints may be coded and passed via the address bits with theside effect of organizing the logical address space according to themeta information. For example, all system files could have the highestorder bit in the address set to one, and therefore all be located in thetop half of the logical address space.

The logical address space may exceed the physical storage capacity ofthe storage devices 106 in the storage system 102. It is common thatdata sent to a storage device 106 or storage system 102 has a minimumsize so that data is sent in identifiable units. For example, data sentto a storage system 102 may be divided up into chunks. Data at the endmay not match up with a minimum size chunk so the remainder of a datachunk, in addition to the tail-end data, may be null characters, zeros,ones, etc.

Assuming that there is some smallest chunk of data sent to a storagesystem 102 and all the possible logical identifiers each correspond to achunk, the number of logical identifiers is huge and the logical storagecapacity associated with the chunks is much larger than the physicalstorage capacity of a storage device 106 in the storage system 102. Theavailable physical storage capacity in the data storage device is notcorrelated to available LIDs. Again this is contrasted with typicalrandom access devices where the available logical block addresses haveabout a one-to-one correspondence with physical block addresses of thestorage device 106.

In a particular embodiment, the storage device driver 118 is coupled toa file server 114/file system via the storage interface 116 and thestorage interface 116 includes an interface to enable the file server114/file system to interact with the storage interface 116. Theinterface may comprise an Application Program Interface (API), blockstorage interface, an enhanced block storage interface, a commandinterface, the like. A command interface according to one embodiment mayinclude a bit in a write command (e.g. client request) to indicate thatan allocation should be done in conjunction with the write. A second bitin a write may indicate that the requested LBA parameter is null orincludes the ID of the client and that the apparatus 400 should allocateone or more LBAs. Or, the client request includes a specific physicalallocation request (length of file) with optional timer, etc.Consequently, the interface permits many different features andfunctions.

The interface may be operational to communicate from the file server114/file system an allocation request to allocate logical capacity of adata storage device and to communicate to the file server 114/filesystem an allocation reply. The allocation reply is in response to theallocation request and includes an indication of whether the logicalspace has sufficient logical space to satisfy the allocation request.The command interface may be implemented as a new input-output control(“IO-CTL”) command or an extension of an existing IO-CTL command. Thecommand interface may implement a new protocol or expand and existingprotocol.

The logical capacity is for storing data on the data storage device. Thestorage device driver 118 and/or the data storage device determine if alogical space includes sufficient unallocated logical space to satisfythe allocation request where the determination includes search of thelogical-to-physical map. The storage device driver 118 may be part ofthe data storage device. However, the determination of sufficientunallocated logical space is not made in the file server 114/filesystem. Instead, the file server 114/file system sends and allocationrequest and the data storage device/driver 118 replies to the allocationrequest after searching a logical-to-physical map corresponding to astorage device 106 that is part of the data storage System 102.

In one embodiment, a storage device interface 120 is operable to couplethe storage device driver 118 to the data storage device sufficient tocause the data storage device to cooperate with the storage devicedriver 118 to determine if the logical space has sufficient logicalcapacity to satisfy the allocation request. The storage device driver118, as mentioned above, may be PCI Express, serial ATA bus, parallelATA bus, SCSI, FireWire, Fibre Channel, USB, PCIe-AS, etc.

The interface 116 may expose the index associating LIDs in the logicaladdress space with respective storage locations on the non-volatilestorage device directly to clients. The clients may call certainfunctions of the interface to identify available allocation space,physical capacity, health of the storage media, which LIDS areallocated, which LIDS are assigned, etc. In summary the interface canexpose all or a subset of the features and functionality of theapparatus 400 directly to clients which may be then use that informationas desired.

FIG. 5 is a schematic block diagram illustrating another embodiment ofan apparatus 500 to allocate data storage space in accordance with thepresent invention. The apparatus 500 includes an allocation requestmodule 402, a logical capacity module 404, and an allocation replymodule 406, which are substantially similar to those described above inrelation to the apparatus 400 of FIG. 4. In addition, the apparatus 500includes a physical capacity request module 502, a physical capacityallocation module 504, a physical capacity reply module 506, anallocation module 508, an allocation query request module 510, anallocation query determination module 512, an allocation query replymodule 514, a logical space management module 516, a mapping module 518,a physical space reservation request module 520, a physical spacereservation module 522, a physical space reservation return module 524,a physical space reservation cancellation module 526, an LID assignmentmodule 528, a DMA module 530, and a deletion module 532, which aredescribed below. The modules 402-406 and 502-532 of the apparatus 500 ofFIG. 5 are depicted in the storage system 102, and all or a portion maybe included in a driver 118, a storage controller 104 or any otherappropriate location known to one of skill in the art.

The apparatus 500 includes, in one embodiment, a physical capacityrequest module 502, a physical capacity allocation module 504, and aphysical capacity reply module 506. The physical capacity request module502 receives from a requesting device a physical capacity request. Thephysical capacity request is received at the data storage device andincludes a request of an amount of available physical storage capacityin the data storage device (and/or physical storage capacity allocatedto the requesting device). The physical capacity request may include aquantity of physical capacity or may indirectly request physical storagecapacity, for example by indicating a size of a data unit to be stored.Another indirect physical storage capacity request may include logicaladdresses of data to be stored which may correlate to a data size. Oneof skill in the art will recognize other forms of a physical capacityrequest.

The physical capacity allocation module 504 determines the amount ofavailable physical storage capacity on the data storage device. Theamount of available physical storage capacity includes a physicalstorage capacity of unassigned storage locations in the data storagedevice. In some embodiments, amount of available physical storagecapacity may be “budgeted,” for example, only a portion of the physicalstorage capacity of the storage device may be available to therequesting device. In some embodiments, amount of available physicalstorage capacity may be “budgeted,” based on a quota associated witheach client or group of clients. The apparatus 500 may enforce thesequotas. The allocation of available physical storage device may bedetermined by configuration parameter(s), may be dynamically adjustedaccording to performance and/or quality of service policies, or thelike.

The physical capacity allocation module 504 may determine the amount ofavailable physical storage capacity using an index (or other datastructure), such as the logical-to-physical map discussed above. Thelogical-to-physical map may indicate storage locations comprising validdata (e.g., storage locations comprising valid data). Thelogical-to-physical map may be referenced to identify assigned storagelocations. The available storage capacity may be a total (or budgeted)physical capacity minus the assigned capacity. Alternatively, or inaddition, an allocation index (or other data structure) may maintain anindicator of the available physical storage capacity. The indicator maybe updated responsive to storage operations performed on the storagedevice including, but not limited to: garbage collection operations,grooming operations, deallocations (e.g., TRIM), writing additionaldata, physical storage capacity reservations, physical storage capacityreservation cancellations, and so on. Accordingly, a “running total” ofavailable physical storage capacity may be available on request.

The physical capacity reply module 506 that communicates a reply to therequesting device in response to the physical capacity allocation module504 determining the amount of available physical storage capacity on thedata storage device.

The physical capacity allocation module 504, in one embodiment, tracksassigned physical addresses, unassigned physical addresses, reservedphysical address capacity, unreserved physical address capacity, and thelike. The physical capacity allocation module 504 may track theseparameters using a logical-to-physical map, a validity map, a freephysical address pool, used physical address pool, a physical-to-logicalmap, or other means known to one of skill in the art.

The reply may take many forms. In one embodiment where the physicalcapacity request includes a request for available physical capacity, thereply may include an amount of available physical storage capacity. Inanother embodiment where the physical capacity request includes aspecific amount of physical capacity, the reply may include anacknowledgement that the data storage device has the requested availablephysical storage capacity. One of skill in the art will recognize otherforms of a reply in response to a physical capacity request.

The apparatus 500 with a physical capacity request module 502, aphysical capacity allocation module 504, and a physical capacity replymodule 506 is advantageous for storage devices 106 where alogical-to-physical mapping is not a one-to-one mapping. In a typicalrandom access device where read and write requests include one or moreLBAs, a file server 114/file system may track physical storage capacityof the storage device 106 by knowing assigned LBAs.

For a log structured file system or similar system where multiplephysical addresses (and thus storage locations) can be mapped to asingle logical identifier (i.e. multiple versions of data mapped to alogical identifier) tracking logical identifiers may not provide anyindication of physical storage capacity. This many to one relationshipbetween storage location and LID may be used to support snap shottingand/or backup. The apparatus 500 keeps track of available physicalstorage space and can communicate the amount of available physicalstorage space to the server 108 or other device. The apparatus 500 isadvantageous because it allows file servers 114/file systems to queryphysical storage capacity. Offloading allocation management and physicalcapacity management to the data storage device is efficient for storagedevices 106 that may store data sequentially, log structured storagedevices, etc.

The assigned physical addresses are mapped to corresponding assignedLIDs. When data is stored in response to a write request, LIDs assignedto the data are mapped to the actual location where the data is stored.For a log structured file system where data is stored sequentially, thelocation where the data is stored is not apparent from the logicalidentifier, even if the logical identifier is an LBA. Instead, the datais stored at an append point and the address where the data is stored ismapped to the logical identifier. If the data is a modification of datastored previously, the LID may be mapped to the current data as well asto a location where the old data is stored. There may be severalversions of the data mapped to the same LID.

The apparatus 500, in one embodiment, includes an allocation module 508that allocates the unallocated logical space sufficient to satisfy theallocation request of the requesting device. The allocation module 508may allocate the unallocated logical space in response to the logicalcapacity module 404 determining that the logical space has sufficientunallocated logical space to satisfy the allocation request.

In one embodiment, the allocation request is part of a pre-allocationwhere logical space is not associated with a specific request to storedata. For example, a client 110 may request, using an allocationrequest, logical space and then may proceed to store data over time tothe allocated logical space. The allocation module 508 allocates LIDs tothe client 110 in response to an allocation request and to the logicalcapacity module 404 determining that the logical space has sufficientunallocated logical space to satisfy the allocation request.

In various embodiments, the allocation module 508 may allocate a subsetof a logical space, may allocate logical space based on an allocationrequest that includes certain criteria for the requested logical space,etc. For example, if an allocation request includes a request toallocate LIDs to a user, the LIDs may have already been allocated to aclient 110 and may also be part of a subset allocated to the user, suchas LIDs allocated to a group associated with the client 110. Theallocation module 508 may associate the LIDs identified in an allocationrequest with the client 110 and the group.

The allocation module 508 may also allocate LIDs based on an allocationrequest associated with a specific storage request. For example, if astorage request includes specific LIDs and the logical capacity module404 determines that the LIDs are available, the allocation module 508may allocate the LIDs in conjunction with storing the data of thestorage request. In another example, if the storage request does notinclude LIDs and the logical capacity module 404 determines that thereare sufficient LIDs to for the storage request, the allocation module508 may select and allocate LIDs for the data and the allocation replymodule 406 may communicate the allocated LIDs.

The allocation module 508 typically locates unallocated LIDs forallocation. There are several ways in which the allocation module 508may identify one or more unallocated LIDs. For example, the allocationmodule 508 may identify unallocated LIDs by receiving a list ofrequested LIDs to allocate from the client 110 and verify that theseLIDs are available for allocation. In another example, the allocationmodule 508 may identify unallocated LIDs by searching for unallocatedLIDs that meet criteria received in conjunction with the request. Thecriteria may be LIDs that are associated with a particular storagedevice 106, that are available in a RAID, that have some assignedmetadata characteristic, etc.

In another example, the allocation module 508 may identify unallocatedLIDs by creating a subset of LIDs that meet criteria received inconjunction with the request identified in a pool of available LIDs. Inone instance, the LIDs may be a subset of LIDs that have already beenallocated to the client 110. For example, if a set or group of LIDs isallocated to a particular user, group, employer, etc., a subset of theLIDs may be allocated. A specific example is if a set of LIDs isallocated to an organization and then a subset of the allocated LIDs isfurther allocated to a particular user in the organization. One of skillin the art will recognize other ways that the allocation module 508 canidentify one or more unallocated LIDs.

The allocation module 508, in one embodiment, can expand the LIDsallocated to a client 110 by allocating LIDs to the client 110 inaddition to LIDs already allocated to the client 110. In addition, LIDsallocated to a client 110 may be decreased by deallocating certain LIDsso that they return to a pool of unallocated LIDs. In other embodiments,subsets of allocated LIDs may be allocated, deallocated, increased,decreased, etc. For example, LIDs allocated to a user in an organizationmay be deallocated so that the LIDs allocate to the user are stillallocated to the organization but not to the user.

The apparatus 500, in one embodiment, includes an allocation queryrequest module 510, an allocation query determination module 512, anallocation query reply module 514. The allocation query request module510 receives an allocation query the data storage device. The allocationquery request module 510 receives an allocation query from somerequesting device, such as a client 110, a file server 114/file system,a master allocation manager 124, etc. An allocation query may include arequest for information about allocating logical space or associatedmanagement of the allocated logical space. For example, an allocationquery may be a request to identify allocated LIDs, identify assignedLIDs, identify allocated LIDs that are not assigned, unallocated LIDs ora range of LIDs, and the like.

The allocation query may include information about logical allocation,logical capacity, physical capacity, or other information meetingcriteria in the allocation query. The information may include metadata,status, logical associations, historical usage, flags, control, etc. Oneof skill in the art will recognize other allocation queries and the typeof information returned in response to the allocation query.

The allocation query includes some type of criteria that allows theallocation query determination module 512 to service the allocationrequest. The allocation query determination module 512, in oneembodiment, identifies one or more LIDs that meet the criteria specifiedin the allocation query. The identified LIDs include allocated LIDs thatare assigned, allocated LIDs that are unassigned, unallocated LIDs, andthe like.

The allocation query reply module 514 communicates to the client 110 theresults of the query to the requesting device or to another device asdirected in the allocation query. The results of the allocation querymay include a list of the identified LIDs, an acknowledgement that LIDsmeeting the criteria were found, an acknowledgement that LIDs meetingthe criteria in the allocation query were not found, assigned/unassignedstatus of LIDs, logical storage capacity, or the like. Typically theallocation query reply module 514 returns status information and theinformation returned may include any information related to managing andallocating LIDs known to those of skill in the art.

The apparatus 500, in another embodiment, includes a logical spacemanagement module 516 that manages the logical space of the data storagedevice from within the data storage device. For example, the logicalspace management module 516 may manage the logical space from a storagecontroller 104 or driver 118 associated with a storage device 106 of thedata storage device. The logical space management module 516 may trackunassigned LIDs and assigned LIDs, for example, in thelogical-to-physical map, in an index, or other data structure. Anassigned LID is an LID that is mapped to one or more physical addresseswhere data from the one or more data packets corresponding to the one ormore assigned LIDs are stored on the storage device 106.

The logical space management module 516, in various embodiments, mayservice allocation requests and allocation queries as described above,and other functions related to allocation. The logical space managementmodule 516 can also include receiving a deallocation request from arequesting device. The deallocation request typically includes a requestto return one or more allocated LIDs to an unallocated state and thencommunicating to the requesting device, or other designated device, thesuccessful deallocation. The deallocation request may include a requestto return one or more storage locations which keeping the associatedLIDS allocated then communicating to the requesting device, or otherdesignated device, the successful deallocation. This might betransparent, or require that the deallocation request be extended toinclude an indication that a logical/physical deallocation shouldaccompany the request. Note that deallocation request may be asynchonousand tied to the groomer. Thus, the deallocation request may is virtual(in time) until completed. The management of the allocations (logicaland physical) may diverge from the actual available space at any pointin time. The management module 516 is configured deal with thesedifferences.

The logical space management module 516 may also receive an LID groupcommand request from a requesting device and may communicate to therequesting device a reply indicating a response to the LID group commandrequest. The LID group command request may include an action to take on,for example, two or more LIDs (“LID group”), metadata associated withthe LID group, the data associated with the LID group, and the like. Forexample, if several users are each allocated LIDs and the users are partof a group, an LID group command may be to deallocate the LIDs forseveral of the users, allocate additional LIDs to each user, returnusage information for each user, etc. The action taken in response tothe LID group command may also include modifying the metadata, backingup the data, backing up the metadata, changing control parameters,changing access parameters, deleting data, copying the data, encryptingthe data, deduplicating the data, compressing the data, decompressingthe data, etc. One of skill in the art will recognize other logicalspace management functions that the logical space management module 516may also perform.

The apparatus 500, in one embodiment, includes a mapping module 518 thatmaps in a logical-to-physical map the assigned LIDs to the assignedphysical addresses. The logical capacity module 404 determines if thelogical space has sufficient unallocated logical space using thelogical-to-physical map mapped by the mapping module 518. Thelogical-to-physical map may be used to track allocation of the assignedLIDs, the unassigned LIDs, the allocated LIDs, the unallocated LIDs, theallocated LID capacity, the unallocated LID capacity, and the like. Inone embodiment, the mapping module 518 maps assigned LIDs andcorresponding assigned physical addresses in multiple maps.

For example, a forward map may be used to quickly identify assignedphysical addresses for a given LID. The forward map may include aB-tree, a content addressable memory (“CAM”), a binary tree, a hashtable, etc. or other data structure that facilitates quickly searching asparsely populated space or range. By using a forward map that quicklysearches a sparsely populated virtual or logical namespace, the mappingmodule 518 provides an efficient way to determine one or more physicaladdresses from a logical identifier.

In addition, a reverse map may be used to quickly access informationrelated to a physical address and to link to a logical identifierassociated with the physical address. The reverse map may be used toidentify an LID from a physical address. A reverse map may be used tomap addresses in a data storage device 106 into erase regions, such aserase blocks, such that a portion of the reverse map spans an eraseregion of the data storage device 106 erased together during a storagespace recovery operation. Organizing a reverse map by erase regionsfacilitates tracking information useful during a storage recoveryoperation. For example, the reverse map may include which physicaladdresses in an erase region have valid data and which have invaliddata. When valid data is copied from an erase region and the eraseregion erased, the reverse map can easily be changed to indicate thatthe erase region does not include data and is ready for sequentialstorage of data.

A more detailed discussion of forward and reverse mapping is included inU.S. patent application Ser. No. 12/098,434, titled Apparatus, System,and Method for Efficient Mapping of Virtual and Physical Addresses,Non-Volatile Storage, to David Flynn, et al., and filed Apr. 8, 2008,which is incorporated herein by reference. By including powerful mappingof LIDs and corresponding physical addresses in the storage system 102,and even in a storage device 106, the mapping efficiently consolidatesfunctions such as thin provisioning, allocation functions, etc. thathave traditionally been done at higher levels. The mapping module 518provides an efficient way to eliminate layers of mapping used intraditional systems.

In a thinly provisioned storage system, one potential problem is that afile server/file system or client may attempt to write data to a storagedevice only to have the write request fail because the storage device isout of available disk space. For random access devices where the fileserver/file system tracks available physical storage capacity relying onthe one-to-one mapping of LBAs to PBAs, the likelihood of a storagedevice running out of storage space is very low. The file server/filesystem may, however, think that the storage device is a random access ifthe storage device is in fact a thinly provisioned system, a logstructured file system, etc. For such a situation, it is desirable toreserve physical space prior to or in conjunction with a write requestso that the write request does not fail. There are other situations aswell where a file server/file system or client may wish to reservephysical storage space.

The apparatus 500 includes a physical space reservation request module520, located in the storage system 102, that receives a request from aclient 110 or file server 114/file system to reserve available physicalstorage capacity on the data storage device (i.e. the storage device 106that is part of the data storage device) [hereinafter a “physical spacereservation request”]. In one embodiment, the physical space reservationrequest includes an indication of an amount of physical storage capacityrequested by the client 110 or file server 114/file system.

The indication of an amount of physical storage capacity requested maybe expressed in terms of physical capacity of the storage device 106 orother direct measure of capacity of the storage device 106. The requestto reserve physical storage capacity may also include a request toallocate the reserved physical storage capacity to a logical entity. Theindication of an amount of physical storage capacity may be expressedindirectly as well. For example, a file server 114/file system mayindicate a number of logical blocks and the data storage device maydetermine a particular fixed size for each logical block and thentranslate the number of logical blocks to a physical storage capacity.One of skill in the art will recognize other indicators of an amount ofphysical storage capacity in a physical space reservation request.

The physical space reservation request, in one embodiment, is associatedwith a write request. In one embodiment, the write request is a two-stepprocess and the physical space reservation request and the write requestare separate. In another embodiment, the physical space reservationrequest is part of the write request or the write request is recognizedas having an implicit physical space reservation request. In anotherembodiment, the physical space reservation request is not associatedwith a specific write request, but may instead be associated withplanned storage, reserving storage space for a critical operation, etc.where mere allocation of storage space is insufficient.

In certain embodiments, the data may be organized into atomic dataunits. For example, the atomic data unit may be a packet, a page, alogical page, a logical packet, a block, a logical block, a set of dataassociated with one or more logical block addresses (the logical blockaddresses may be contiguous or noncontiguous), a file, a document, orother grouping of related data.

In one embodiment, an atomic data unit is associated with a plurality ofnoncontiguous and/or out of order logical block addresses or otheridentifiers that the write data pipeline handles as a single atomic dataunit. As used herein, writing noncontiguous and/or out of order logicalblocks in a single write operation is referred to as an atomic write. Inone embodiment, a hardware controller processes operations in the orderreceived and a software driver of the client sends the operations to thehardware controller for a single atomic write together so that the writedata pipeline can process the atomic write operation as normal. Becausethe hardware processes operations in order, this guarantees that thedifferent logical block addresses or other identifiers for a givenatomic write travel through the write data pipeline together to thenonvolatile memory. The client, in one embodiment, can back out,reprocess, or otherwise handle failed atomic writes and/or other failedor terminated operations upon recovery once power has been restored.

In one embodiment, apparatus 500 may mark blocks of an atomic write witha metadata flag indicating whether a particular block is part of anatomic write. One example metadata marking is to rely on the logwrite/append only protocol of the nonvolatile memory together with ametadata flag, or the like. The use of an append only log for storingdata and prevention of any interleaving blocks enables the atomic writemembership metadata to be a single bit. In one embodiment, the flag bitmay be a 0, unless the block is a member of an atomic write, and thenthe bit may be a 1, or vice versa. If the block is a member of an atomicwrite and is the last block of the atomic write, in one embodiment, themetadata flag may be a 0 to indicate that the block is the last block ofthe atomic write. In another embodiment, different hardware commands maybe sent to mark different headers for an atomic write, such as firstblock in an atomic write, middle member blocks of an atomic write, tailof an atomic write, or the like.

On recovery from a power loss or other failure of the client or of thestorage device, in one embodiment, the apparatus 500 scans the log onthe nonvolatile memory in a deterministic direction (for example, in oneembodiment the start of the log is the tail and the end of the log isthe head and data is always added at the head). In one embodiment, thepower management apparatus scans from the head of the log toward thetail of the log. For atomic write recovery, in one embodiment, whenscanning head to tail, if the metadata flag bit is a 0, then the blockis either a single block atomic write or a non-atomic write block. Inone embodiment, once the metadata flag bit changes from 0 to 1, theprevious block scanned and potentially the current block scanned aremembers of an atomic write. The power management apparatus, in oneembodiment, continues scanning the log until the metadata flag changesback to a 0, at that point in the log, the previous block scanned is thelast member of the atomic write and the first block stored for theatomic write.

In one embodiment, the nonvolatile memory uses a log-based, append onlywrite structured writing system where new writes go on the front of thelog (i.e. at the head of the log). In a further embodiment, the storagecontroller reclaims deleted, stale, and/or invalid blocks of the logusing a garbage collection system, a groomer, a cleaner agent, or thelike. The storage controller, in a further embodiment, uses a forwardmap to map logical block addresses to physical addresses to facilitateuse of the append only write structure and garbage collection.

The apparatus 500, in one embodiment, includes a physical spacereservation module 522 that determines if the data storage device (i.e.storage device 106) has an amount of available physical storage capacityto satisfy the physical storage space request. If the physical spacereservation module 522 determines that the amount of available physicalstorage capacity is adequate to satisfy the physical space reservationrequest, the physical space reservation module 522 reserves an amount ofavailable physical storage capacity on the storage device 106 to satisfythe physical storage space request. The amount of available physicalstorage capacity reserved to satisfy the physical storage space requestis the reserved physical capacity.

The amount of reserved physical capacity may or may not be equal to theamount of storage space requested in the physical space reservationrequest. For example, the storage system 102 may need to storeadditional information with data written to a storage device 106, suchas metadata, index information, error correcting code, etc. In addition,the storage system 102 may encrypt data, which may affect storage size.The storage system 102 may also compress data, which may reduce theamount of physical storage capacity required to satisfy the requestedamount in the physical space reservation request.

In one embodiment, the physical space reservation request includes anamount of logical space and the indication of an amount of physicalstorage capacity requested is derived from the requested logical space.In another embodiment, the physical space reservation request includesone or more LIDs and the indication of an amount of physical storagecapacity requested is derived from an amount of data associated with theLIDs. In one example, the data associated with the LIDs is data that hasbeen assigned to the LIDs, such as in a write request. In anotherexample, the data associated with the LIDs is a data capacity allocatedto each LID, such as would be the case if an LID is an LBA and a logicalblock size could be used to derive the amount of requested physicalstorage capacity.

In another embodiment, the physical space reservation request is arequest to store data. In this embodiment the physical space reservationrequest may be implied and the indication of an amount of physicalstorage capacity requested may be derived from the data and/or metadataassociated with the data. In another embodiment, the physical spacereservation request is associated with a request to store data. In thisembodiment, the indication of an amount of physical storage capacityrequested is indicated in the physical space reservation request and maybe correlated to the data of the request to store data.

The physical space reservation module 522 may also then factor metadata,compression, encryption, etc. to determine an amount of requiredphysical capacity to satisfy the physical space reservation request. Theamount of physical capacity required to satisfy the physical spacereservation request may be equal to, larger, or smaller than an amountindicated in the physical space reservation request.

Once the physical space reservation module 522 determines an amount ofphysical capacity required to satisfy the physical space reservationrequest, the physical space reservation module 522 determines if one ormore storage devices 106 a-n in the storage system 102, eitherindividually or combined, have enough available physical storagecapacity to satisfy the physical space reservation request. The requestmay be for space on a particular storage device (e.g. 106 a), acombination of storage devices 106, such as would be the case if some ofthe storage devices 106 are in a RAID, or for available space generallyin the storage system 102. The physical space reservation module 522 maytailor a determination of available capacity to specifics of thephysical space reservation request.

Where the physical space reservation request is for space on more thanone storage device, the physical space reservation module 522 willtypically retrieve available physical storage capacity information fromeach logical-to-physical map of each storage device 106 or a combinedlogical-to-physical map of a group of storage devices 106. The physicalspace reservation module 522 typically surveys assigned physicaladdresses. Note that the physical space reservation module 522 may nothave enough information to determine available physical capacity bylooking at assigned LIDs, because there is typically not a one-to-onerelationship between LIDs and physical addresses.

The physical space reservation module 522 reserves physical storagecapacity, in one embodiment, by maintaining enough available storagecapacity to satisfy the amount of requested capacity in the physicalspace reservation request. Typically, in a log structured file system orother sequential storage device, the physical space reservation module522 would not reserve a specific physical region or physical addressrange in the storage device 106, but would instead reserve physicalstorage capacity.

For example, a storage device 106 may have 500 gigabytes (“GB”) ofavailable physical storage capacity. The storage device 106 may bereceiving data and storing the data at one or more append points, thusreducing the storage capacity. Meanwhile, a garbage collection orstorage space recovery operation may be running in the background thatwould return recovered erase blocks to storage pool, thus increasingstorage space. The locations where data is stored and freed areconstantly changing so the physical space reservation module 522, in oneembodiment, monitors storage capacity without reserving fixed physicalstorage locations.

The physical space reservation module 522 may reserve storage space in anumber of ways. For example, the physical space reservation module 522may halt storage of new data if the available physical storage capacityon the storage device 106 decreased to the reserved storage capacity,may send an alert if the physical storage capacity on the storage device106 was reduced to some level above the reserved physical storagecapacity, or some other action or combination of actions that wouldpreserve an available storage capacity above the reserved physicalstorage capacity.

In another embodiment, the physical space reservation module 522reserves a physical region, range of physical addresses, etc. on thedata storage device. For example, if the physical space reservationmodule 522 reserved a certain quantity of erase blocks, data associatedwith the physical space reservation request may be stored in thereserved region or address range. The data may be stored sequentially inthe reserved storage region or range. For example, it may be desirableto store certain data at a particular location. One of skill in the artwill recognize reasons to reserve a particular region, address range,etc. in response to a physical space reservation request.

In one embodiment, the apparatus 500 includes a physical spacereservation return module 524 that transmits to the client 110 or fileserver 114/file system an indication of availability or unavailabilityof the requested amount of physical storage capacity in response to thephysical space reservation module 522 determining if the data storagedevice has an amount of available physical storage space that satisfiesthe physical space reservation request. For example, if the physicalspace reservation module 522 determines that the available storage spaceis adequate to satisfy the physical space reservation request, thephysical space reservation return module 524 may transmit a notice thatthe physical space reservation module 522 has reserved the requestedstorage capacity or other appropriate notice.

If, on the other hand, the physical space reservation module 522determines that the storage device 106 or storage system 102 does nothave enough available physical storage capacity to satisfy the physicalspace reservation request, the physical space reservation return module524 may transmit a failure notification or other indicator that therequested physical storage space was not reserved. The indication ofavailability or unavailability of the requested storage space, forexample, may be used prior to writing data to reduce a likelihood offailure of a write operation.

The apparatus 500, in another embodiment, includes a physical spacereservation cancellation module 526 that cancels all or a portion ofreserved physical storage space in response to a cancellation triggeringevent. The cancelation triggering event may come in many differentforms. For example, the cancellation triggering event may includedetermining that data to be written to the storage device 106 or storagesystem 102 and associated with available space reserved by the physicalspace reservation module 522 has been previously stored in the storagesystem 102.

For example, if a deduplication process determines that the data alreadyexists in the storage system 102, the data may not need to be storedagain since the previously stored data could be mapped to two or moreLIDs. In a more basic example, if reserved physical storage space isassociated with a write request and the write request is executed, thecancellation triggering event could be completion of storing data of thewrite request. In this example, the physical space reservationcancellation module 526 may reduce or cancel the reserved physicalstorage capacity.

If the data written is less than the reserved space, the physical spacereservation cancellation module 526 may merely reduce the reservedamount, or may completely cancel the reserved physical storage capacityassociated with the write request. Writing to less than the reservedphysical space may be due to writing a portion of a data unit where thedata unit is the basis of the request, where data associated with aphysical space reservation request is written incrementally, etc. In oneembodiment, physical storage space is reserved by the physical storagespace reservation module 522 to match a request and then due tocompression or similar procedure, the storage space of the data storedis less than the associated reserved physical storage capacity.

In another embodiment, the cancellation triggering event is a timeout.For example, if a physical space reservation request is associated witha write request and the physical space reservation module 522 reservesphysical storage capacity, if the data associated with the write requestis not written before the expiration of a certain amount of time thephysical space reservation cancellation module 526 may cancel thereservation of physical storage space. One of skill in the art willrecognize other reasons to cancel all or a portion of reserved physicalcapacity.

The physical space reservation module 522, in one embodiment, mayincrease or otherwise change the amount of reserved physical storagecapacity. For example, the physical space reservation request module 520may receive another physical space reservation request, which may or maynot be associated with another physical space reservation request. Wherethe physical space reservation request is associated with previouslyreserved physical storage capacity, the physical space reservationmodule 522 may increase the reserved physical storage capacity. Wherethe physical space reservation request is not associated with previouslyreserved physical storage capacity, the physical space reservationmodule 522 may separately reserve physical storage capacity and trackthe additional storage capacity separately. One of skill in the art willrecognize other ways to request and reserve available physical storagecapacity and to change or cancel reserved capacity. Standard managementshould include some kind of thresholds, triggers, alarms and the likefor managing the physical storage capacity, providing indicators to theuser that action needs to be taken. Typically, this would be done in themanagement system. But, either the management system would have to poolthe devices under management or said devices would have to beconfigured/programmed to interrupt the manger when a criteria was met(preferred).

The apparatus 500, in another embodiment, includes an LID assignmentmodule 528 that, in response to a request from a client 110 or fileserver 114/file system to write data, assigns one or more unassignedLIDs to the data and transmits the assigned LIDs to the client 110 orfile server 114/file system. The LID assignment module 528, in oneembodiment, allows on-the-fly allocation and assignment of LIDs. Therequest to write data, in another embodiment, may be a two step process.The LID assignment module 528 may allocate LIDs in a first step for datato be written and then in a second step the data may be written alongwith the allocated LIDs.

In one embodiment, the LID allocation module 402 allocates LIDs in acontiguous range. The LID assignment module 528 may also allocate LIDsin a consecutive range. Where a logical space is large, the LIDallocation module 402 may not need to fragment allocated LIDs but may beable to choose a range of LIDs that are consecutive. In anotherembodiment, the LID allocation module 402 assigns LIDs that may not becontiguous and may use logical spaces that are interspersed with otherallocated logical spaces.

The apparatus 500, in another embodiment, includes a DMA module 530 thatpulls data from a client 110 in a direct memory access (“DMA”) and/or aremote DMA (“RDMA”) operation. The data is associated with LIDs assignedby the LID allocation module 402. The data is first identified in arequest to store data, such as a write request, and then the storagecontroller 104 then executes a DMA and/or RDMA to pull data from theclient 110 to a storage device 106 in the storage system 102. In anotherembodiment, the write request does not use a DMA or RDMA, but insteadthe write request includes the data. Again the data is associated withLIDs that are assigned by the LID allocation module 402.

In one embodiment, the apparatus 500 includes a deletion module 532. Inresponse to a request to delete data from the data storage device, inone embodiment, the deletion module 532 removes the mapping betweenstorage space where the deleted data was stored and the correspondingLID. The deletion module 532 may also deassign the one or more physicaladdresses of the deleted data and also may deallocate the one or morephysical addresses of the deleted data.

Flow Charts

FIG. 6 is a schematic flow chart diagram illustrating one embodiment ofa method 600 for allocating data storage space in accordance with thepresent invention. The method 600 begins and the allocation requestmodule 402 receives 602 from a requesting device, such as a client 110,file server 114/file system, master allocation manager 124, etc., anallocation request to allocate logical capacity. The allocation requestis received at a data storage device. Logical capacity is for storingdata on the data storage device.

The logical capacity module 404 determines 604 if a logical space of thedata storage device includes sufficient unallocated logical space tosatisfy the allocation request where the determination includes a searchof a logical-to-physical map. The logical-to-physical map includesassigned LIDs of the logical space mapped to one or more physicallocations where data corresponding to the assigned LIDs is stored on thedata storage device and an assigned LID differs from the one or morephysical addresses mapped to the assigned LID. The allocation replymodule 406 communicates 606 a reply to the requesting device and themethod 600 ends.

FIG. 7 is a schematic flow chart diagram illustrating one embodiment ofa method 700 for allocating data storage space in accordance with thepresent invention. The method 700 begins and the physical capacityrequest module 502 receives 702 from a requesting device a physicalcapacity request. The physical capacity request is received at the datastorage device. The physical capacity request includes a request of anamount of available physical storage capacity in the data storagedevice. The physical capacity request, for example, may be a specificamount of physical capacity, may be derived from a request to storedata, etc.

The physical capacity allocation module 504 determines 704 the amount ofavailable physical storage capacity on the data storage device where theamount of available physical storage capacity includes a physicalstorage capacity of unassigned storage locations in the data storagedevice. The physical capacity reply module 506 communicates 706 a replyto the requesting device in response to the physical capacity allocationmodule 504 determining the amount of available physical storage capacityon the data storage device, and the method 700 ends.

FIG. 8 is a schematic flow chart diagram illustrating one embodiment ofa method 800 for reserving physical storage space in accordance with thepresent invention. The method 800 begins and the physical spacereservation request module 520 receives 802 a physical space reservationrequest to reserve available physical storage space. The physical spacereservation request includes an indication of an amount of physicalstorage capacity requested. The indication of an amount of physicalstorage capacity could take many forms, such as a number of bytes or anumber of logical blocks, a request to store specific data, or otherindirect indication where the indication of an amount of physicalstorage is derived from the request.

The physical space reservation module 522 determines 804 if the datastorage device has available physical storage capacity to satisfy thephysical storage space request. If the physical space reservation module522 determines 804 that the data storage device has available physicalstorage capacity to satisfy the physical storage space request, thephysical space reservation module 522 reserves 806 physical storagecapacity adequate to service the physical space reservation request andthe physical space reservation return module 524 transmits 808 to therequesting client 110 or file server 114/file system an indication thatthe requested physical storage space is reserved.

The physical allocation module 404 maintains 810 enough availablephysical storage capacity to maintain the reservation of physicalstorage capacity until the reservation is used by storing dataassociated with the reservation or until the reservation is cancelled,and the method 800 ends. If the physical space reservation module 522determines 804 that the data storage device does not have availablephysical storage capacity to satisfy the physical storage space request,the physical space reservation return module 524 transmits 812 to therequesting client 110 or file server 114/file system an indication thatthe requested physical storage space is not reserved or an indication ofinsufficient capacity, and the method 800 ends.

FIG. 9 is a schematic flow chart diagram illustrating one embodiment ofa method 900 for assigning allocated logical identifiers in a datastorage device in accordance with the present invention. The method 900begins and the LID assignment module 528 receives 901 a write requestfrom a client 110. In other embodiments, the request originates in afile server 114/file system or other component in the system 100, 101,103. The write request is a request to write data to one or more storagedevices 106 in the storage system 102 where the data has not beenassigned to any logical identifiers or logical identifiers have not beenallocated for the data. The request may be received by the storagesystem 102 and the storage controller 104 or other component mayrecognize that LIDs have not been assigned to the data in the writerequest and the request is forwarded to the LID assignment module 528.

The LID assignment module 528 assigns 904 one or more unassigned LIDs tothe data. The storage controller 104 stores the data on the storagedevice 106 and the mapping module 518 maps 908 one or more physicaladdresses where the data was stored to the assigned LIDs. Where data isstored sequentially on the storage device 106, physical addresses wherethe data is stored are typically not known prior to the write requestbut are determined after or just prior to storing the data. The LIDassignment module 528 communicates 910 the assigned LIDs to the client110, and the method 900 ends. The communication could be part of aconfirmation that the data is stored successfully.

FIG. 10 is a schematic flow chart diagram illustrating anotherembodiment of a method 1000 for assigning allocated logical identifiersin data storage device 106 in accordance with the present invention. Themethod 1000 begins and the LID assignment module 528 receives 1002 arequest to assign LIDs to data where the LIDs are allocated to theclient 110 making the request. In another embodiment, the request comesfrom a file server 114/file system or other device in the system 100,101, 103. The LID assignment module 528 assigns 1004 LIDs to the datathat are allocated to the client 110 making the request. The LIDassignment module 528 communicates 1006 the assigned LIDs to the client110.

The storage system 102 receives 1006 a write request to write data to astorage device 106 in the storage system 102 where the data has theassigned LIDs associated with the data. In other embodiments, the writerequest is to store the data on more than one storage device 106 in thestorage system 103, such as would be the case if the storage devices 106are RAIDed or if the data is written to a primary storage device 106 andto a mirror storage device 106. The storage controller 104 stores 1010the data on the storage device 106 and the mapping module 518 maps 1012one or more physical addresses where the data is stored to the assignedLIDs. The storage controller 104 or other component in the storagesystem 102 communicates 1014 a write confirmation to the requestingclient 110 and the method 1000 ends.

FIG. 11 is a schematic flow chart diagram illustrating an embodiment ofa method 1100 for servicing an allocation query at a storage device inaccordance with the present invention. The allocation query requestmodule 510 receives 1102 an allocation query at the data storage device.The allocation query determination module 512 identifies 1104 one ormore LIDs that meet a criteria specified in the allocation query. Theidentified LIDs include allocated LIDs that are assigned, allocated LIDsthat are unassigned, and/or unallocated LIDs. The allocation query replymodule 514 communicates 1106 the results of the allocation query to arequesting device or other designated device and the method 1100 ends.The results may include a list of the identified LIDs, anacknowledgement that LIDs meeting the criteria were found, anacknowledgement that LIDs meeting the criteria in the allocation querywere not found, etc.

FIG. 12 is a schematic block diagram of exemplary datastructures forassociating LIDs with storage locations on a non-volatile storage device(e.g., storage device 106). An index 1204 may comprise a tree (or otherdata structure) comprising a plurality of storage entries (e.g., entries1208, 1214, 1216, and so on). Each storage entry in the index 1204 mayassociate a LID (or LID range or set) with one or more storage locationsof the non-volatile storage device 106. The storage locations may beidentified and/or indexed by LID 1217 (e.g., as depicted in entry 1214),a LID range, set, or the like. The storage entries in the index 1204 maybe of variable size or length, such that a single storage entry (e.g.,entry 1214) may reference a set of LIDs, a LID range, or the like. TheLIDs of a storage entry may be contiguous (e.g. 072-083). Other entries,such as 1218, may comprise a discontiguous set of LIDs (e.g., LID454-477 and 535-598). Accordingly, the index 1204 may be used torepresent variable sized storage entries (e.g., storage entriescorresponding to one or more storage locations of the non-volatilestorage device 106 comprising data of an arbitrary set or range ofLIDs).

As shown in FIG. 12, the storage entries may be indexed by LID (usingedges, such as edge 1210), which may enable fast and efficient storageentry lookups. A exemplary search for a storage entry comprising the LID“182” may proceed as follows. The search may initiate at a root storageentry, which, in the FIG. 12 example, is storage entry 1208. Where asingle LID (or address range) is included at a particular storage entry,such as the root storage entry 1208, if a LID being searched (“182”) islower than the LID of the storage entry 1208, the search may continuedown a directed edge 1210 to the left of the storage entry 1208. If thesearched LID (“182”) matches the current storage entry 1208 (e.g., islocated within the range of the storage entry 1208), the searchsuccessfully terminates with the current storage entry 1208 beingidentified. If the searched LID 1206 is greater than the range of thecurrent entry 1208, the search continues down directed edge 1212 to theright of the current storage entry 1208. Where an storage entry includestwo LIDs or address ranges (e.g., a discontinuous set as shown in entry1218) and a searched LID (“182”) falls between the listed virtualaddresses, the search continues down a center directed edge (not shown)to entries with LIDs that fall between the two LIDs of the current entry1208. A search continues down the index 1204 until an storage entry isidentified or a leaf storage entry is reached and the search fails. Inthe FIG. 12 example, the search successfully terminates at the matchingstorage entry 1216 (e.g., the storage entry 1216 comprises the searchedLID (“182”).

Although in the FIG. 12 example the index 1204 is implemented using aB-Tree datastructure indexed by LID, in other embodiments, the index1204 may be implemented using a content addressable memory (“CAM”), abinary tree, a hash table, or other datastructure known in the art, andmay comprise other types of indexing, such as size indexing, storagelocation indexing (e.g., as in the reverse map 1222 described below),and so on.

Each storage entry in the index 1204 may associate one or more LIDs withrespective storage locations(s) of the non-volatile storage device 106.For example, the entry 1214 may associate the LID range 072-083 withstorage locations 95-106. In some embodiments, the storage locations maybe identified by a physical address. Those of skill in the art willrecognize that the physical addresses of the storage locations may bestored in the index 1204 or an offset into one or more storagestructures of the solid-state storage media. As discussed above, thestorage locations of the storage entry 1214 may change due tomodifications to the underlying data (e.g., due to modify, recoveryoperations, or the like).

The storage entries may further comprise and/or reference metadata 1219,which may comprise metadata pertaining to the LIDs, such as age, size,LID attributes (e.g., client identifier, data identifier, file name,group identifier), and so on. Since the metadata 1219 is associated withthe storage entries, which are indexed by LID (e.g., address 1215), themetadata 1219 may remain associated with the storage entry 1214regardless of changes to the location of the underlying storagelocations on the non-volatile storage device 106 (e.g., changes to thestorage locations 1217).

The index 1204 may be used to efficiently determine whether thenon-volatile storage device 106 comprises a storage entry referenced ina client request and/or to identify a storage location of data on thedevice 106. For example, the non-volatile storage device 106 may receivea client request 1202 to allocate a particular LID. The request 1202 mayspecify a particular LID, a LID and a length or offset (e.g., request 3units of data starting from LID 074), a set of LIDs or the like.Alternatively, or in addition, the client request 1202 may comprise aset of LIDs, LID ranges (continuous or discontinuous), or the like.

The non-volatile storage device 106 may determine whether a storageentry corresponding to the requested LIDs is in the index 1204 using asearch operation as described above. If a storage entry comprising therequested LIDs is found in the index 1204, the LID(s) associated withthe request 1202 may be identified as being allocated and assigned.Accordingly, data corresponding to the LID(s) may be stored on thenon-volatile storage device 106. If the LID(s) are not found in theindex 1204, the LID(s) may be identified as unassigned (but may beallocated). Since the storage entries may represent sets of LIDS and/orLID ranges, a client request may result in partial allocation. Forexample, a request to allocate 068-073 may successfully allocate LIDs068 to 071, but may fail to allocate 072 and 073 since these areincluded in the storage entry 1214. In the event of a partialallocation, the entire allocation request may fail, the available LIDsmay be allocated and other LIDs may be substituted for the failed LIDs,or the like.

In the example depicted in FIG. 12, the storage entry corresponding tothe storage request 1202 is in the index 1204 (storage entry 1214), and,as such, the LIDs associated with the request 1202 are identified asallocated and assigned. Therefore, if the client request 1202 is to readdata at the specified LIDs; data may be read from the storage locations1217 identified in the storage entry 1214 and returned to the originatoror the request. If the client request 1202 is to allocate the identifiedLIDs, the allocation request may fail (and/or substitute LIDs may beallocated as described above).

When new storage entries are added to the index 1204, a merge operationmay occur. In a merge operation, an existing storage entry may be“merged” with one or more other storage entries. For instance, a newstorage entry for LIDs 084-088 may be merged with entry 1214. The mergemay comprise modifying the LID 1215 of the storage entry to include thenew addresses (e.g., 072-088) and/or to reference the storage locations1217 to include the storage location on which the data was stored.

Although the storage entries in the index 1204 are shown as comprisingreferences to storage locations (e.g., addresses 1217), the disclosureis not limited in this regard. In other embodiments, the storage entriescomprise reference or indirect links to the storage locations. Forexample, the storage entries may include a storage location identifier(or reference to the reverse map 1222).

FIG. 12 depicts another example of an index comprising a reverse map1222, which may associate storage locations of the non-volatile storagedevice 106 with LIDs in the logical address space. The reverse map 1222may also associate a storage location with metadata, such as a validityindicator 1230, and/or other metadata 1236 (described below). In someembodiments, the storage location address 1226 and/or length 1228 may beexplicitly included in the reverse map 1222. Alternatively, the storagelocation address 1226 and/or data length 1228 may be inferred from alocation and/or arrangement of an entry in the reverse map 1222 and, assuch, the address 1226 and/or data length 1228 may be omitted. In someembodiments, the reverse map 1222 may include references to LIDs 1234.

As discussed above, the reverse map 1222 may comprise metadata 1236,which may include metadata pertaining to sequential storage operationsperformed on the storage locations, such as sequence indicators (e.g.,timestamp) to indicate a sequence in which the data was stored (e.g., aswell as an “age” of the storage locations and so on). The metadata 1236may further include metadata pertaining to the storage media, such aswear level, reliability, error rate, disturb status, and so on. Themetadata 1236 may be used to identify unreliable and/or unusable storagelocations, which may reduce the physical storage capacity of thenon-volatile storage device 106.

The reverse map 1222 may be organized according to storage divisions(e.g., erase blocks) of the non-volatile storage device 106. In thisexample, the entry 1220 that corresponds to storage entry 1218 islocated in erase block n 1238. Erase block n 1238 is preceded by eraseblock n−1 1240 and followed by erase block n+1 1242 (the contents oferase blocks n−1 and n+1 are not shown). An erase block may comprise apredetermined number of storage locations. An erase block may refer toan area in the non-volatile storage device 106 that is erased togetherin a storage recovery operation.

The validity metadata 1230 may be used to determine an availablephysical storage capacity of the non-volatile storage device 106 (e.g.,a difference between physical capacity (or budgeted capacity) and thestorage locations comprising valid data). The reverse map 1222 may bearranged by storage division (e.g. erase blocks) or erase region toenable efficient traversal of the physical storage space (e.g., toperform grooming operations, determine physical storage capacity, and soon). Accordingly, in some embodiments, the available physical capacitymay be determined by traversing the storage locations and/or eraseblocks in the reverse map 1222 to identify the available physicalstorage capacity (and/or is being used to store valid data).

Alternatively, or in addition, the reverse map 1222 (or otherdatastructure) may comprise an indicator 1238 to track the availablephysical capacity of the non-volatile storage device 106. The availablephysical capacity indicator 1238 may be initialized to the physicalstorage capacity (or budgeted capacity) of the storage device 106, andmay be updated as storage operations are performed. The storageoperations resulting in an update to the available physical storagecapacity indicator 1238 may include, but are not limited to: storingdata on the storage device 106, reserving physical capacity on thestorage device 106, canceling a physical capacity reservation, storingdata associated with a reservation where the size of the stored datadiffers from the reservation, detecting unreliable and/or unusablestorage locations and/or storage division (e.g., taking storagelocations out of service), and so on.

FIG. 13 depicts another example of an index 1304 for managing storageallocation of a non-volatile storage device. In the FIG. 13 example, theindex 1304 may be modified to include one or more allocation entries(e.g., allocated entry 1314). An allocation entry may be used to trackLIDs that are allocated to a client, but are not yet assigned (e.g., arenot associated with data stored on the non-volatile storage device 106).Therefore, unlike the storage entries (e.g., entries 1308, 1316, and1318), an allocation entry 1314 may not include references to storagelocations 1317; these references may be set to “unassociated,” “NULL,”or may be omitted. Similarly, metadata 1319 associated with theallocation entry 1314 may indicate that the entry is not assigned and/orassociated with data.

The index 1304 may be used to determine an available logical capacity ofthe logical address space (e.g., by traversing the index 1304). Theavailable logical capacity may consider LIDs that are assigned (usingthe storage entries), as well as LIDs that are allocated, but not yetassigned (using the allocation entries, such as 1314).

As shown in FIG. 13, in some embodiments, the allocation entries 1314may be maintained in the index 1304 with the storage entries.Alternatively, allocation entries may be maintained in a separate index(or other datastructure). When an allocation entry becomes associatedwith data on the non-volatile storage device 106 (e.g., as associatedwith storage locations), the allocation entry may be modified and/orreplaced by a storage entry.

In some embodiments, the index 1304 (or index 1204) may comprise anindicator 1330 to track the available logical capacity of the logicaladdress space. The available logical capacity may be initializedaccording to the logical address space presented by the storage device106. Changes to the index 1304 may cause the available logical capacityindicator 1330 to be updated. The changes may include, but are notlimited to: addition of new allocation entries, removal of allocationentries, addition of storage entries, removal of allocation entries, orthe like.

FIG. 14 depicts an example of an unallocated index 1444, which may beused to allocate storage in a non-volatile storage device. The index1444 may comprise entires 1450, which may correspond to “holes” in theLIDs indexes 1204 and/or 1304 described above. Accordingly an entry 1450in the available index 1444 may correspond to a LID (and/or LID range,set, or the like) that is available (e.g., is not allocated norassigned). The index 1444 may be used to quickly determine the logicalstorage capacity of a logical storage space and/or to identify LIDs toallocate in response to client requests. In the FIG. 14 example, theentries in the index 1444 are shown as being indexed by LID. In someembodiments, however, the index 1444 may indexed in other (oradditional) ways. For example, the unallocated index 1444 may be indexedby LID range (e.g., by the size of the LID range) as well as LID. Thisindexing may be used to identify unallocated LIDs sized according toclient requests (e.g., to efficiently fill “holes” in the logicaladdress space).

FIG. 15 is a flow diagram of one embodiment of a method 1500 forallocating storage. As described above, steps of the method 1500 may betied to particular machine components and/or may be implemented usingmachine-readable instructions stored on a non-transitorymachine-readable storage medium.

At step 1510 a non-volatile storage device may be initialized for use.The initialization may comprise allocating resources for thenon-volatile storage device (e.g., solid-state storage device 106), suchas communications interfaces (e.g., bus, network, and so on), allocatingvolatile memory, accessing solid-state storage media, and so on. Theinitialization may further comprise presenting a logical address space,initializing one or more indexes (e.g., the indexes described above inconjunction with FIGS. 12-14), and so on.

At step 1520, the non-volatile storage device may present a logicalspace to one or more clients. Step 1520 may comprise implementing and/orproviding an interface (e.g., API) accessible to one or more clients, orthe like.

At step 1530, the non-volatile storage device may maintain metadatapertaining to logical allocation operations performed by the method1500. The logical allocation operations may pertain to operations in thelogical address space presented at step 1520, and may include, but arenot limited to: allocating logical capacity, assigning logical capacityto storage locations, and so on. The metadata may include, but is notlimited to: indexes associating LIDs in the logical address space withstorage locations on the non-volatile storage device; indexesassociating storage locations with LIDs (e.g., index 1204 of FIG. 12),allocation entries indicating allocated LIDs having no associatedstorage location (e.g., index 1304 of FIG. 13), an unallocated index(e.g. index 1444 of FIG. 14), maintaining an indicator of unallocatedlogical address space (e.g., indicator 1330 of FIG. 13), and so on.

At step 1540, a client request pertaining to a LID in the logicaladdress space may be received. The client request may comprise a queryto determine if a particular LID and/or logical capacity can beallocated, a request to allocate a LID and/or logical capacity, arequest to store data on the non-volatile storage device, or the like.

At step 1550, the metadata maintained at step 1530 may be referenced todetermine whether the client request can be satisfied. Step 1550 maycomprise referencing the metadata (e.g., indexes and/or indicators)maintained at step 1530 to determine an available logical capacity ofthe logical address space and/or to identify available LIDs (or LIDrange) as described above.

At step 1560, the method 1500 may provide a response to the clientrequest, which if the request cannot be satisfied may comprise providinga response to indicate such. If the client request can be satisfied, theproviding the response may comprise one or more of: an indicator thatthe allocation can be satisfied, allocating LIDs satisfying the request,providing allocated LIDs satisfying the request, providing one or morerequested LIDs and/or one or more additional LIDs, (e.g., if a portionof a requested set of LIDs can be allocated), or the like.

Following step 1560, the flow may return to step 1530, where the method1500 may update the metadata (e.g., indexes, indicators, and so on)according to the allocation operation (if any) performed at step 1560.

FIG. 16 is a flow diagram depicting an embodiment of a method 1600 forallocating storage. As described above, steps of the method 1600 may betied to particular machine components and/or may be implemented usingmachine-readable instructions stored on a non-transitorymachine-readable storage medium.

At steps 1610, 1620, and 1630, the method 1600 may be initialized,present a logical storage space to one or more clients, and/or maintainmetadata pertaining to logical operations performed by the method 1600.

At step 1632, the method 1602 may maintain metadata pertaining tophysical storage operations performed by the method 1600. The storageoperations may include, but are not limited to: reserving physicalstorage capacity, canceling physical storage capacity reservations,storing data on the non-volatile storage device, deallocating physicalstorage capacity, grooming operations (e.g., garbage collection, errorhandling, and so on), physical storage space budgeting, and so on. Asdiscussed above, metadata maintained at step 1632 may include, but isnot limited to: indexes associating LIDs in the logical address spacewith storage locations on the non-volatile storage device; indexesassociating storage locations with LIDs (e.g., index 1204 of FIG. 12),allocation entries indicating allocated LIDs having no associatedstorage location (e.g., index 1304 of FIG. 13), an unallocated index(e.g. index 1444 of FIG. 14), maintaining an indicator of unallocatedlogical address space (e.g., indicator 1330 of FIG. 13), and so on.

At step 1642, a client request pertaining to physical storage capacityof the non-volatile storage device may be received. The client requestmay comprise a query to determine of a physical storage capacity isavailable, a request to reserve physical storage capacity, a request tostore data, a request to deallocate data (e.g., TRIM), or the like.

At step 1650, the metadata maintained at steps 1630 and/or 1632 may bereferenced to determine whether the client request can be satisfied.Step 1650 may comprise referencing the metadata at steps 1630 and/or1632 to determine an available physical storage capacity of thenon-volatile storage device and/or to identify storage locationsassociated with particular LIDs (e.g., in a deallocation request orTRIM) as described above.

At step 1660, the method 1600 may provide a response to the clientrequest, which if the request cannot be satisfied may comprise providinga response to indicate such. If the client request can be satisfied, theproviding the response may comprise one or more of: indicating that theclient request can and/or was satisfied, reserving physical storagecapacity for the client; cancelling a physical storage capacityreservation, storing data on the non-volatile storage device,deallocating physical storage capacity, or the like.

The present invention may be embodied in other specific forms withoutdeparting from its spirit or essential characteristics. The describedembodiments are to be considered in all respects only as illustrativeand not restrictive. The scope of the invention is, therefore, indicatedby the appended claims rather than by the foregoing description. Allchanges which come within the meaning and range of equivalency of theclaims are to be embraced within their scope.

What is claimed is:
 1. A method for allocating non-volatile datastorage, comprising: presenting a logical address space to a storageclient through a storage interface, the logical address space comprisinga plurality of logical identifiers (LIDs); maintaining an indexassociating LIDs in the logical address space with respective storagelocations on the non-volatile storage device; and referencing the indexto determine whether a client request to allocate logical capacity inthe logical address space can be satisfied based on allocations of theLIDs of the logical address space, wherein the client request identifiesa set of LIDs in the logical address space, and wherein determiningwhether the client request can be satisfied comprises determiningwhether one or more LIDs of the identified set of LIDs are in the index.2. The method of claim 1, wherein the client request identifies anordered set of LIDs in the logical address space, and whereindetermining whether the client request can be satisfied comprisesdetermining whether one or more LIDS of the identified, ordered set ofLIDs are in the index.
 3. The method of claim 1, wherein determiningwhether the client request can be satisfied comprises, determining anunassigned logical capacity of the logical address space; and comparingthe unassigned logical capacity to the logical capacity of the clientrequest.
 4. The method of claim 1, further comprising: maintainingallocation entries to indicate allocation of LIDs having no associatedstorage location; and determining an unallocated logical capacity usingthe allocation index, wherein determining whether the client request canbe satisfied comprises comparing the logical capacity of the clientrequest to the unallocated logical capacity.
 5. The method of claim 4,wherein the allocation entries are maintained in the index.
 6. Themethod of claim 1, further comprising: maintaining an unallocated indexcomprising unallocated LIDs in the logical address space; anddetermining that the client request to allocate logical capacity in thelogical address space can be satisfied in response to identifying a LIDin the unallocated index.
 7. The method of claim 1, wherein providing aresponse comprises one of: providing allocated LIDs satisfying theclient request; indicating that the request can be satisfied; indicatingthat the request cannot be satisfied; and indicating that LIDssatisfying the client request are allocated.
 8. The method of claim 1,wherein the client request comprises a first LID to allocate, andwherein providing the response comprises providing a second, differentLID in response to the first LID being allocated.
 9. The method of claim1, the client request pertaining to data to store on the non-volatilestorage device, the method further comprises: storing the datapertaining to the client request at a storage location of thenon-volatile storage device; and associating the storage location with aLID in the index.
 10. The method of claim 1, wherein the index comprisesone of: a LID associated with a plurality of storage locations of thenon-volatile storage device; and a storage location associated with aplurality of LIDs.
 11. The method of claim 1, wherein the logicaladdress space exceeds a physical storage capacity of the non-volatilestorage device.
 12. The method of claim 11, further comprising:receiving a request to allocate physical storage capacity for anallocated LID that is not assigned a storage location on thenon-volatile storage device; determining an available physical storagecapacity of the non-volatile storage device; providing a responseindicating whether the available physical storage capacity satisfies therequest.
 13. The method of claim 12, further comprising, in response tosatisfying the request to allocate physical storage capacity for theallocated LID: storing data corresponding to the allocated LID on astorage location of the non-volatile storage device; and assigning aphysical address for the storage location to the allocated LID in theindex.
 14. A method for allocating non-volatile storage, comprising:presenting a logical address space of a non-volatile storage device to aclient, the logical address space comprising a plurality of logicalidentifiers (LIDs), the LIDs being independent of storage locations ofthe non-volatile storage device, wherein a physical capacitycorresponding to the LIDs exceeds a physical storage capacity of thenon-volatile storage device, wherein each LID is capable of being mappedto any of the storage locations of the non-volatile storage device;receiving from the client a request for storage capacity, wherein therequest comprises a first LID to allocate; and providing a second,different LID in the logical address space to the client in response todetermining that the first LID is allocated.
 15. A non-transitorystorage medium comprising machine-readable instructions configured tocause a machine to perform a method for allocating non-volatile storage,the method comprising: presenting by a non-volatile storage device, alogical address space comprising a plurality of logical identifiers(LIDs) to a client, the LIDs being independent of storage locations ofthe non-volatile storage device and exceeding a physical storagecapacity of the non-volatile storage device; receiving from the client arequest to store data on the non-volatile storage device, the requestspecifying a LID to allocate to the client; selecting a different LID inthe logical address space to allocate to the client in response todetermining that the specified LID is allocated; storing data of therequest on a storage location of the non-volatile storage device; andassociating the LID allocated to the client with the storage locationcomprising the data of the request.
 16. A method for allocatingnon-volatile storage, the method comprising: maintaining an indexpertaining to allocation operations within a logical address space of asolid-state storage device and to storage operations of the solid-statestorage device, wherein the allocation operations within the logicaladdress space pertain to allocating logical identifiers of the logicaladdress space to respective storage clients; accessing the index tomanage storage operations of the solid-state storage device; andaccessing the index to manage an allocated logical capacity supported bythe solid-state storage device, wherein a logical identifier included ina client request to allocate logical capacity is determined to beallocated in response to determining that the logical identifier is inthe index.
 17. The method of claim 16, wherein the index pertaining toallocation operations is stored in a shared datastructure with metadatapertaining to storage operations performed on the solid-state storagedevice.
 18. The method of claim 16, wherein the index pertaining toallocation operations comprises an allocation indicator identifyinglogical identifiers of the logical capacity that have been allocated,the method further comprising: using the allocation indicators torespond to an allocation query.
 19. An apparatus, comprising: a logicalspace management module configured to present a logical address space ofa non-volatile storage device that exceeds a physical storage capacityof the non-volatile storage device, the logical address space comprisinga plurality of logical identifiers (LIDs) that exceed a physical storagecapacity of the non-volatile storage device; a mapping module configuredto maintain an index configured to map LIDs in the logical address spaceto storage locations of the non-volatile storage device; and anallocation module configured to respond to a client request for physicalstorage capacity by referencing the index to determine availablephysical storage capacity of the non-volatile storage device, whereinthe client request comprises one or more logical identifiers, andwherein the allocation module is further configured to determine whetherthe client request can be satisfied by determining whether the one ormore logical identifiers are allocated.
 20. The apparatus of claim 19,wherein the allocation module is configured to determine availablephysical storage capacity by identifying storage locations of thenon-volatile storage device that are not assigned to LIDs in the index.21. The apparatus of claim 19, further comprising a physical capacityallocation module configured to maintain an indicator of availablephysical storage capacity of the non-volatile storage device responsiveto storage operations performed on the non-volatile storage device. 22.The apparatus of claim 21, wherein the physical capacity allocationmodule is configured to update the indicator of available physicalstorage capacity in response to a storage operation comprising one ormore of: a storage operation storing data associated with a physicalstorage capacity reservation, wherein the storing does not require aportion of the associated physical storage capacity reservation; astorage operation canceling a physical storage capacity reservation; anda storage operation canceling a portion of a physical storage capacityreservation.
 23. The apparatus of claim 19, wherein the mapping moduleis configured to update an association between a LID and a storagelocation in response to one or more of: moving data stored at thestorage location to a different storage location of the non-volatilestorage device; the data stored at the storage location being identicalto data stored at a second storage location, the updating comprisingassociating the LID with the second storage location; and one or morestorage locations associated to one or more LIDs are remapped to one ormore different LIDs.
 24. The apparatus of claim 19, further comprising aphysical space reservation module configured to maintain reservationsfor physical storage capacity, wherein determining available physicalstorage capacity further comprises accessing the reservations.
 25. Theapparatus of claim 19, further comprising a physical space reservationmodule configured to reserve available physical storage capacity of thenon-volatile storage device in response to satisfying the client requestand to maintain sufficient available physical storage capacity on thenon-volatile storage device to satisfy the reservation.
 26. Theapparatus of claim 19, wherein the client request pertains to data to bestored on the non-volatile storage device, the apparatus furthercomprising a storage controller configured to store data referenced inthe client request on a storage location of the non-volatile storagedevice, wherein the mapping module is configured to map the storagelocation to a LID in the index.
 27. The apparatus of claim 19, whereinthe client request comprises one of: an amount of logical capacity inthe logical address space used to derive the requested physical storagecapacity; one or more LIDs in the logical address space used to derivethe requested physical storage capacity; a request to store data, fromwhich the requested physical storage capacity is derived; a request toreserve the physical storage capacity; and a request to reserve thephysical storage capacity and to allocate a corresponding logicalcapacity in the logical address space.